Template:Taxonbar/doc

From MycoTaxa
Revision as of 14:16, 21 April 2025 by Mdelola (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Description[edit source]

This metadata template links Wikipedia articles to various biological and taxonomic databases. Taxonbar displays these links as short strings, indicating the unique identifier each database has assigned the taxon for catalogue purposes.

Taxonomic identifiers of each taxon are stored and retrieved from each taxon's corresponding Wikidata entry, but can be overridden in individual articles with locally entered data. Adding the data to Wikidata is preferable.

This project is based on the work of {{Authority Control}} and Wikidata:WikiProject Taxonomy. If you are a template editor or Wikipedia administrator, you may contribute at Module:Taxonbar. Please discuss ideas/thoughts for improvement or use on Template:Taxonbar/talk.

Taxonbar is placed below all navigation templates, except Authority control (not shown here).

Position[edit source]

Please place Taxonbar correctly. As a metadata template, Taxonbar should be placed:

Usage[edit source]

Add Taxonbar to an article:

  1. In Source editing mode, insert {{Taxonbar|from=}} below all other navigation templates except Authority control — it is preferable to add the from = QID parameter even if just a single Wikidata item points to the article.
  2. Click "Show preview" to check placement, and to see which taxon identifiers are automatically pulled from Wikidata.
  3. If you have more identifiers to add, consider adding them to the article's Wikidata item, so that all versions of Wikipedia automatically benefit. Be careful not to edit the structure or names of Wikidata taxa until you have become familiar with Wikidata:WikiProject Taxonomy and Wikidata:WikiProject Taxonomy/Tutorial.

Basic code:

{{Taxonbar|from=}}

Taxon example[edit source]

Pileated woodpecker (Dryocopus pileatus), syn. Picus pileatus

{{Taxonbar|from=Q930712}} when placed in the Pileated woodpecker article: Error: "Q930712" is not a valid Wikidata entity ID.

Basic use samples[edit source]

Examples of articles demonstrating its use include:

Taxon identifiers[edit source]

The template can automatically get its information from the following properties on Wikidata. This is configured in Module:Taxonbar/conf.

List of taxon identifiers[edit source]

Taxon identifiers by parameter name
ParameterWikidata IDAuthorityDescription
abaP4526
adwP4024
afdP6039
afromothsP6093
algaebaseP1348
amphibiawebP5036
antwebP5299
aoiP5003
aofpP6159
apaP6137
apdbP2036
aphid species fileP12767
apniP5984
apsaP2809
araneaeP3594
arkiveP2833
aswP5354
atrfP6904
ausfungiP9076
auslichenP9093
avibaseP2026
bacdiveP2946
bamonaP3398
bhlP687
biolibP838
birdlifeP5257
birdlife-australiaP6040
boldP3606
bowP3444
btoP4798
bugguideP2464
butmothP3060
calfloraP3420
cal-ipcP6176
colP10585
centerP6003
cmsP6033
cnpsP4194
cockroach species fileP6052
cockroach species file newP12817
coleorrhyncha species fileP12771
conifersP1940
coolP6408
coreoidea species fileP6053
dermaptera species fileP12750
ebirdP3444
ecocropP4753
ecosP6030
eflorasaP6933
embioptera species fileP12751
eolP830
eppoP3031
eunisP6177
euringP3459
euro+med plantbaseP12380
faunaeuropaeaP1895
faunaeuropaeanewP4807
feisP6044
featherbaseP12589
fishbaseP938
florabaseP3101
flowP6096
fnaP1727
foaoP3100
foao2P6756
focP1747
foioP3795
gbifP846
gisdP5626
gnabP4715
goniatP5216
grassbaseP1832
grinP1421
grylloblattodea species fileP12768
ibcP3099
ifpniP6341
inaturalistP3151
indexfungorumP1391
ipaP6161
ipniP961
irmngP5055
iscP5698
isoptera species fileP12752
itisP815
iucnP627
lepindexP3064
lobP5862
lpsnP1991
lygaeoidea species fileP11311
lygaeoidea species file newP12818
mantophasmatodea species fileP12769
mantodea species fileP6055
mddP12560
michiganfloraP6103
mobotpfP6034
molP6092
mnhnP6046
millibaseP12271
monaP4758
mabenaP9608
mswP959
mycobankP962
nasP6163
natureserveP10243
nbnP3240
ncbiP685
neotropicalP6047
noaaP6049
nswfloraP3130
ntfloraP5953
nzboP6048
nzorP2752
nzpcnP7496
observation.orgP6105
obisP6754
odnrP6289
ottolP9157
orthoptera species fileP6050
orthoptera species file newP12785
paldatP4122
paleobiodbP10907
fossilworksP842
panarcticP2434
pfafP4301
pfiP6114
phasmida species fileP4855
phasmida species file newP12819
plecoptera species fileP12770
ppeP6061
plantlistP1070
plantsP1772
plantzafricaP12645
plaziP1992
powoP5037
psocodea species fileP8145
psocodea species file newP12820
psyl'listP6376
rdP5473
rhsP8765
sanbiP6056
scalenetP6516
sccP6057
sealifebaseP6018
seinetP6209
species+P2040
speciesfungorumP1391
spratP2455
steereP6035
taxonomiconP7066
tree of lifeP5221
tropicosP960
tsaP5397
vascanP1745
vicfloraP5945
watsonP1761
white-filesP6347
world arachnid catalogP11803
wioP6285
wisfloraP6227
woiP3746
wfoP7715
world auchenorrhyncha dbP12057
wormsP850
wscP3288
xeno-cantoP2426
zoobankP1746
zoraptera species fileP12753

Manual identifiers[edit source]

Some taxon identifiers not currently in Wikidata can be added via additional parameters listed above; however, adding the data to Wikidata is preferable, so that all versions of Wikipedia automatically benefit.

Example:

{{ Taxonbar | powo = urn:lsid:ipni.org:names:30009317-2 }}

On Lilium, the result is the following, where the taxon identifier in the Plants of the World Online has been added to those picked up from Wikidata:

Lua error in mw.wikibase.lua at line 98: too many expensive function calls.

If there are multiple Wikidata entries resulting in multiple rows, the row to which an identifier is added can be specified by appending a number matching the relevant |from#= parameter.

A Wikispecies page can be also added manually. However, it is preferable to link it to the Wikidata item; this can be done at the Wikidata page within the "Multilingual sites" section, entering "species" as the "wiki".

Parameter Database Property URL/Interwiki link
Wikispecies Wikispecies Wikispecies:$1

Hide specific identifier (optional)[edit source]

Individual identifiers listed in the table above can be removed/hidden from the bar by setting the corresponding parameter to no. This is useful when trying to reduce the number of unhelpful links within Taxonbar. Spaces are optional. There is no sense in removing too many identifiers, for example: removing plant or fungi identifiers from an animal taxon would have no effect, as these parameters will not show up on an animal taxon in the first place. It is best to preview {{Taxonbar}} on the page and decide what entries provide little relevant data. Plant species will have the most entries and are most likely in need of hiding some entries.

Example: To remove FOC, IPNI, and AFPD, the code would look like:

{{ Taxonbar | foc = no | ipni = no | apdb = no }}

On Coffea arabica, the result is:

Error: "Q47685" is not a valid Wikidata entity ID.

Displaying excluded databases (optional)[edit source]

These databases are available at Wikidata but are excluded by default on the English-language Wikipedia as they are not in the English language. They can be included in the {{taxonbar}} by setting the corresponding parameter to yes (e.g. |CoL-Taiwan=yes), which will then retrieve the value from Wikidata, or by setting the value of the parameter manually (e.g. |CoL-Taiwan=395235).

Wikidata property name      ID Authority Description Language
P3088 Taiwanese
P4902 Spanish
P5263 Czech
P6115 French
P4630 French
P1939 Swedish
P6043 French
P5179 Catalan
P6094 German
P4311 Dutch
P6054 French
P2794 French
P6025 French
P3102 Russian
P3186 French
P3105 French
P4125 French
P6142 Dutch
P3322 Dutch
P4664 Portuguese

Multiple Wikidata entries[edit source]

The parameter |from= / |from1= will be implicitly determined by the Wikidata item linked to the article. For maintenance purposes it is preferable to explicitly provide the linked Wikidata item in the |from= / |from1= parameter, although it is not strictly required. If it is not provided the article will be listed at Category:Taxonbars without from parameter.

Parameters |from2=, |from3=, etc., can also be added, for example, if the linked Wikidata item differs from the taxon name of the English-language Wikipedia article. Some taxa exist under multiple names (synonyms) on Wikidata. To add these synonyms, use the |from2=, |from3=, etc., parameters to specify their Wikidata IDs. If there is more than one row, the taxon name from Wikidata will be shown in the leftmost column — to overwrite this, use the |title= / |title1=, |title2=, |title3=, etc. parameters.

For example, {{Taxonbar|from=Q26972265|from2=Q20717272}}, when placed on the page Dog produces: Error: "Q26972265" is not a valid Wikidata entity ID.
Error: "Q20717272" is not a valid Wikidata entity ID.

The same approach can be used when monotypic taxa have a single article, but there are multiple entries in Wikidata.

For example, at Haptanthus, which covers the genus and its sole species, {{Taxonbar|from1=Q15715555|from2=Q133951}} produces: Error: "Q15715555" is not a valid Wikidata entity ID.
Error: "Q133951" is not a valid Wikidata entity ID.

You can manually add taxon identifiers not present in Wikidata to a specific row by appending the appropriate number to the end of the parameter name — for example, to add an inaturalist identifier to the second row, use |inaturalist2=.

Basionyms[edit source]

Basionyms available on Wikidata (via (P566)) are automatically appended. You may also manually specify the basionym via |from#= to manually specify its position.

For example, both

{{Taxonbar|from1=Q43372357|from2=Q164254}} and
{{Taxonbar|from1=Q43372357|from2=Q164254|from3=Q21977691}}

would produce identical taxonbars for Ponerorchis cucullata: Error: "Q43372357" is not a valid Wikidata entity ID.
Error: "Q164254" is not a valid Wikidata entity ID.
Error: "Q21977691" is not a valid Wikidata entity ID.

However, changing the order of the IDs will alter their position in the taxonbar so

{{Taxonbar|from1=Q43372357|from2=Q21977691|from3=Q164254}}

produces a taxonbar with the basionym in a different position: Error: "Q43372357" is not a valid Wikidata entity ID.
Error: "Q21977691" is not a valid Wikidata entity ID.
Error: "Q164254" is not a valid Wikidata entity ID.

More taxon examples[edit source]

Purge server cache

lthumb Arabica coffee, Coffea arabica Error: "Q47685" is not a valid Wikidata entity ID.
lthumb Jaguar, Panthera onca Error: "Q35694" is not a valid Wikidata entity ID.
lthumb Fly agaric, Amanita muscaria Error: "Q131227" is not a valid Wikidata entity ID.
lthumb Lactobacillus acidophilus Error: "Q132644" is not a valid Wikidata entity ID.
lthumb Plasmodium falciparum Error: "Q311383" is not a valid Wikidata entity ID.

Module editing — to-do list[edit source]

  • Continue to add support for new, useful parameters (search)

Module editing — to-don't list[edit source]

See also[edit source]

Other links[edit source]

Tracking categories[edit source]

Maintenance required[edit source]

Maintenance desired[edit source]

Tracking only (no error)[edit source]


TemplateData[edit source]

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Taxonbar in articles based on its TemplateData.

TemplateData for Taxonbar

Links to taxonomic databases via Wikidata

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Wikidata itemfrom

no description

Example
Q1
Unknownsuggested