Module:Autotaxobox/doc: Difference between revisions

Content deleted Content added
updated transclusion count
another module that is used
 
(11 intermediate revisions by 3 users not shown)
Line 1:
{{High-risk|255568}}
{{Module rating|protected}}
{{Lua|Module:TaxonItalics|Module:Taxobox ranks}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 
Line 11 ⟶ 12:
| 6 = [[Special:PrefixIndex/Module:Autotaxobox|subpages]]
| 7 = [[Module:Autotaxobox/sandbox|sandbox]]
| 8 = [[Module talk:Autotaxobox/testcases|testcases]]
}}
 
Line 90 ⟶ 91:
== callTaxonomyKey ==
This function prepares for, and then calls, {{tl|Taxonomy key}} to display a taxonomy
template page (which in turn invokes [[#taxonomyList|<code>taxonomyList</code>]] from this module). It does this by building up the information the template
requires, following one <code>same_as</code> link if present, and then calling it.
 
Line 143 ⟶ 144:
:<nowiki>{{#invoke:Autotaxobox|taxonLink|taxon=Dinosauria/?|link_target=Dinosaur|plain_link_text=Dinosauria|extinct=yes}}</nowiki> → {{#invoke:Autotaxobox|taxonLink|taxon=Dinosauria/?|link_target=Dinosaur|plain_link_text=Dinosauria|extinct=yes}}
 
==UtilitiestaxonInfo==
These functions are intended to be used only in analysing and understanding the automated taxobox system, including the taxonomic hierarchies encoded in taxonomy templates – for example in testing and debugging. They are not part of the functioning of the automated taxobox system.
 
===showRankTable===
Returns a sortable wikitable containing the ranks and corresponding numerical values defined in <code>getRankTable()</code> and used in checking the consistency of a taxonomic hierarchy. If a taxon has a value in the rank table, it should always be lower than one higher in the taxonomic hierarchy.
 
Usage:
 
:<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.
 
Line 167 ⟶ 158:
:<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}}
 
==Utilities==
These functions are intended to be used only in analysing and understanding the automated taxobox system, including the taxonomic hierarchies encoded in taxonomy templates – for example in testing and debugging. They are not part of the functioning of the automated taxobox system.
 
===getMaxSearchLevels===
Line 238 ⟶ 232:
:<nowiki>{{#invoke:Autotaxobox|listAll|Plantae}}</nowiki> → {{#invoke:Autotaxobox|listAll|Plantae}}
:<nowiki>{{#invoke:Autotaxobox|listAll|Felis}}</nowiki> → {{#invoke:Autotaxobox|listAll|Felis}}
 
===removeQualifier===
Given a taxon name, this function returns the name with any qualifier (i.e. any part after a "/") removed.
 
Usage:
 
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|showRankTableremoveQualifier|''taxon_name''}}</code>
 
Examples:
 
:<nowiki>{{#invoke:Autotaxobox|removeQualifier|Eukaryota/display}}</nowiki> → {{#invoke:Autotaxobox|removeQualifier|Eukaryota/display}}
:<nowiki>{{#invoke:Autotaxobox|removeQualifier|Felis}}</nowiki> → {{#invoke:Autotaxobox|removeQualifier|Felis}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
Line 244 ⟶ 250:
 
}}</includeonly>
<noinclude>
[[Category:Module documentation pages]]
</noinclude>