Difference between revisions of "Template:Clade transclude/doc"
Jump to navigation
Jump to search
imported>Jts1882 (use subtrees for pruning →Examples with pruning) |
imported>Jts1882 (add label with subtrees within →Examples of selection transclusion for a larger cladogram) |
||
| Line 31: | Line 31: | ||
}} | }} | ||
| − | <!-- example 2: using | + | <!-- example 2: using label --> |
| − | |description2=''' | + | |description2='''Label''' <br/> (with subtree) |
|code2=<pre>{{Clade transclude | |code2=<pre>{{Clade transclude | ||
| + | |page=Template:Phylogeny/APG IV/sandbox | ||
| + | |label=Fabids | ||
| + | |wrap= | ||
| + | }}</pre> | ||
| + | |output2={{Clade transclude | ||
| + | |page=Template:Phylogeny/APG IV/sandbox | ||
| + | |label=Fabids | ||
| + | |wrap= | ||
| + | }} | ||
| + | |||
| + | |||
| + | <!-- example 3: using subtree --> | ||
| + | |description3='''Subtree''' | ||
| + | |code3=<pre>{{Clade transclude | ||
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|subtree=SUPERROSIDS | |subtree=SUPERROSIDS | ||
|wrap= | |wrap= | ||
}}</pre> | }}</pre> | ||
| − | | | + | |output3={{Clade transclude |
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|subtree=SUPERROSIDS | |subtree=SUPERROSIDS | ||
| Line 44: | Line 58: | ||
}} | }} | ||
| − | <!-- example | + | <!-- example 4: using marked section in target page --> |
| − | | | + | |description4='''Section''' |
| − | | | + | |code4=<pre>{{Clade transclude |
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|section=Lamiids | |section=Lamiids | ||
|wrap= | |wrap= | ||
}}</pre> | }}</pre> | ||
| − | | | + | |output4={{Clade transclude |
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|section=Lamiids | |section=Lamiids | ||
| Line 58: | Line 72: | ||
| − | <!-- example | + | <!-- example 5: using label with nested components --> |
| − | | | + | |description5='''Label''' |
| − | | | + | |code5=<pre>{{Clade transclude |
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|label=Eudicots | |label=Eudicots | ||
|wrap= | |wrap= | ||
}}</pre> | }}</pre> | ||
| − | | | + | |output5={{Clade transclude |
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|label=Eudicots | |label=Eudicots | ||
|wrapx=}} | |wrapx=}} | ||
| − | <!-- example | + | <!-- example 6: using subtree with nested components --> |
| − | | | + | |description6='''Label''' |
| − | | | + | |code6=<pre>{{Clade transclude |
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|label=EUDICOTS | |label=EUDICOTS | ||
|wrap= | |wrap= | ||
}}</pre> | }}</pre> | ||
| − | | | + | |output6={{Clade transclude |
|page=Template:Phylogeny/APG IV/sandbox | |page=Template:Phylogeny/APG IV/sandbox | ||
|subtree=EUDICOTS | |subtree=EUDICOTS | ||
Revision as of 08:21, 13 November 2019
This template can partially transclude marked sections and subclades from cladograms contructed with the {{clade}} template. The template and module were written with{{clade}} cladograms in mind, but the section option works with any page.
Contents
Parameters:
|page=– the page name containing the target section or cladogram.|section=– get a named section. This works like{{#section}}and retrieved sections marked with<section begin=NAME />and<section end=NAME />|label=– get a subclade associated with|labelN=and|N=in a cladegram.|subtree=– get a subtree associated with|targetX=and|subcladeX=in a cladegram.|wrap=– wraps a subclade retrieved with|section=in a {{clade}} template. The label for the root of the tree is the section name if|wrap=used purely as a flag or|wrap=VALUEif a value provided.|xsection=–|xlabel=–|xsubtree=–
Examples:
Examples of selection transclusion for a larger cladogram
| Description | Code | Output |
|---|---|---|
| Label |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|label=Commelinids
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
|
Label (with subtree) |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|label=Fabids
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
| Subtree |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|subtree=SUPERROSIDS
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
| Section |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|section=Lamiids
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
| Label |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|label=Eudicots
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
| Label |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|label=EUDICOTS
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
Examples with pruning
| Description | Code | Output |
|---|---|---|
| Subtree |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|subtree=SUPERROSIDS
|exclude=Malvids
|replace=Malvid clade pruned
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
|
Subtree (Eudicots pruned) |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|subtree=EUDICOTS
|exclude=Superrosids
|replace=Superrosids clade pruned
|exclude2=Superasterids
|replace2=Superasterids clade pruned
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
|
Subtree (Eudicots pruned) |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|subtree=EUDICOTS
|exclude=Malvids
|replace=Malvid clade pruned
|exclude2=Fabids
|replace2=Fabid clade pruned
|exclude3=Lamiids
|replace3=Lamiid clade pruned
|exclude4=Campanulids
|replace4=Campanulids clade pruned
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
|
Subtree (basal tree) |
{{Clade transclude
|page=Template:Phylogeny/APG IV/sandbox
|label=Angiosperms
|exclude=Magnoliids
|replace=Magnoliids clade pruned
|exclude2=Monocots
|replace2=Monocots clade pruned
|exclude3=Eudicots
|replace3=Eudicots clade pruned
|wrap=
}} | Page with title "Template:Phylogeny/APG IV/sandbox" not found. |
Note that in the last example the Angiosperm tree must be pruned or an expansion depth limit is exceeded. This is because this template recontructs the whole tree before processing. If the whole tree is wanted call the {{Phylogeny/APG IV}} template directly.
More examples at:
- Template:Phylogeny/APG IV (nested subtrees)
- Template:Phylogeny/APG IV/sandbox (all subtrees basal)
- User:Jts1882/test/transclude sections