Module:Autotaxobox/doc: Difference between revisions

Content deleted Content added
updates, clarifications
added documentation for showRefs
Line 108:
}}</code>
 
== taxonInfoshowRefs ==
Shows the refs field in a taxonomy template, handing incertae sedis taxa and using '–' for absent refs.
Given the names of a taxon and the required item of information stored in the taxon's taxonomy template, this function returns the value of the item, following one "same as" link if available and the value would otherwise be the empty string. It can be used externally via {{tl|Taxon info}}.
 
Usage:
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxonInfoshowRefs|''taxon_name''|''item_namerefs''}}</code>
 
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxonInfo|''taxon_name''|''item_name''}}</code>
 
Parameters:
 
:The first unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists.
:The possible values of the second unnamed parameter are given at {{tl|Taxon info/doc}}.
 
Examples:
:<nowiki>{{</nowiki>#invoke:Autotaxobox|showRefs|Neoscona|<nowiki>{{</nowiki>Taxon info|Neoscona|refs}}}} → {{#invoke:Autotaxobox|showRefs|Neoscona|{{Taxon info|Neoscona|refs}}}}
 
:<nowiki>{{</nowiki>#invoke:Autotaxobox|taxonInfoshowRefs|FelisIncertae sedis/Characidae|rank}}</nowiki> → {{#invoke:Autotaxobox|taxonInfoshowRefs|FelisIncertae sedis/Characidae|rank}}
:<nowiki>{{#invoke:Autotaxobox|taxonInfo|Aves/skip|same_as}}</nowiki> → {{#invoke:Autotaxobox|taxonInfo|Aves/skip|same_as}}
:<nowiki>{{#invoke:Autotaxobox|taxonInfo|Aves/skip|parent}}</nowiki> → {{#invoke:Autotaxobox|taxonInfo|Aves/skip|parent}}
 
== taxonLink ==
Line 159 ⟶ 151:
 
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|showRankTable}}</code>
 
===taxonInfo===
Given the names of a taxon and the required item of information stored in the taxon's taxonomy template, this function returns the value of the item, following one "same as" link if available and the value would otherwise be the empty string. It can be used externally via {{tl|Taxon info}}.
 
Usage:
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|taxonInfo|''taxon_name''|''item_name''}}</code>
 
Parameters:
:The first unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists.
:The possible values of the second unnamed parameter are given at {{tl|Taxon info/doc}}.
 
Examples:
:<nowiki>{{#invoke:Autotaxobox|taxonInfo|Felis|rank}}</nowiki> → {{#invoke:Autotaxobox|taxonInfo|Felis|rank}}
:<nowiki>{{#invoke:Autotaxobox|taxonInfo|Aves/skip|same_as}}</nowiki> → {{#invoke:Autotaxobox|taxonInfo|Aves/skip|same_as}}
:<nowiki>{{#invoke:Autotaxobox|taxonInfo|Aves/skip|parent}}</nowiki> → {{#invoke:Autotaxobox|taxonInfo|Aves/skip|parent}}
 
===getMaxSearchLevels===