Difference between revisions of "Module:TaxonList/doc"
blackwiki>Peter coxhead (needn't be a template, just another page) |
blackwiki>Peter coxhead (→Usage: better language) |
||
| Line 13: | Line 13: | ||
== Usage == | == Usage == | ||
| − | The <code>main<code> function in this module must only be | + | The <code>main<code> function in this module must only be invoked from within a template that itself is transcluded from a page that supplies taxon name/authority pairs as arguments, since <code>main<code> picks up these arguments from the <em>parent</em> frame. |
<code><nowiki>{{</nowiki>#invoke:TaxonList|main|PARAMETERS}}</code> | <code><nowiki>{{</nowiki>#invoke:TaxonList|main|PARAMETERS}}</code> | ||
Revision as of 11:05, 12 November 2017
Module:TaxonList Template:Toolbar
The purpose of this module is to provide support for a set of templates that produce a list of taxon names and their authorities, with the taxon names possibly italicized, wikilinked or emboldened. It allows these templates to have an indefinite number of arguments of the form taxonName1|authority1|taxonName2|authority2| ... |taxonNameN|authorityN.
Usage
The main function in this module must only be invoked from within a template that itself is transcluded from a page that supplies taxon name/authority pairs as arguments, since main picks up these arguments from the parent frame.
{{#invoke:TaxonList|main|PARAMETERS}}
where PARAMETERS may be
italic – set to yes to italicize each taxon name
linked – set to yes to wikilink each taxon name
bold – set to yes to embolden each taxon name (also turns off wikilinking)
incomplete – set to yes to output "(incomplete)" at the end of the list
Examples
{{Taxon list}} contains {{#invoke:TaxonList|main|incomplete={{{incomplete|no}}}}}. Hence:
{{Taxon list |Asparagales|Bromhead |Iridales|Dumortier}} →
Template:Taxon list
{{Linked species list}} contains {{#invoke:TaxonList|main|linked=yes|italic=yes|incomplete={{{incomplete|no}}}}}. Hence:
{{Linked species list |Poecilotheria fasciata|(Latreille, 1804) |Poecilotheria ornata|Pocock, 1899 |Poecilotheria rajaei|Nanayakkara et al., 2012 |incomplete=yes}} →
- Nanayakkara et al., 2012 (Latreille, 1804)
- Poecilotheria ornata Poecilotheria fasciata
- Pocock, 1899 Poecilotheria rajaei
(incomplete list)