Module:Autotaxobox/doc: Difference between revisions

Content deleted Content added
taxonLink: update
updates, clarifications
Line 150:
:<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}}
 
==showRankTableUtilities==
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.
 
Line 157 ⟶ 160:
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|showRankTable}}</code>
 
===getMaxSearchLevels===
==Utilities==
TheseReturns functionsthe aremaximum intendednumber toof belevels usedof only in analysinga taxonomic hierarchies,hierarchy e.g.encoded in testing and debugging, and not for direct use intaxonomy templates used inthat the automatedsystem taxoboxwill systemsearch.
 
Usage:
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|getMaxSearchLevels}}</code> → {{#invoke:Autotaxobox|getMaxSearchLevels}}
 
===find===
Given a taxon name and a rank, this function returns the taxon's ancestor of the given rank.
 
Usage:
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|''taxon_name''|''rank''}}</code>
 
Parameters:
:The first unnamed parameter should be the name of a taxon for which "Template:Taxonomy/''taxon_name''" exists.
:The second unnamed parameter should be the Latinized name of a rank.
 
Examples:
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Felis|ordo}}</code> → {{#invoke:Autotaxobox|find|Felis|ordo}}
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Felis|classis}}</code> → {{#invoke:Autotaxobox|find|Felis|classis}}
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Pteranodon|phylum}}</code> → {{#invoke:Autotaxobox|find|Pteranodon|phylum}}
:<code><nowiki>{{</nowiki>#invoke:Autotaxobox|find|Pteranodon|classis}}</code> → {{#invoke:Autotaxobox|find|Pteranodon|classis}}
 
===nth===