Documentation for the automated taxobox system

Taxonomy templates

Taxobox templates

Notes for "old hands"

සංස්කරණය

Major changes to the automated taxobox system were made from the middle of 2016 onwards. There were two motivations:

  1. to remove expansion depth overflows, caused by the constant addition of clades to some taxonomic hierarchies, especially dinosaur taxa
  2. to clarify and simplify the system, both for maintaining editors and for editors creating and editing taxonomy templates.

All traversals of the taxonomic hierarchy are now coded in Lua, in Module:Autotaxobox. This completely removes the need for clever tricks to get round the absence of iteration and recursion in the template language, as well as expansion depth issues caused by these tricks. Hierarchies with 100 levels can now be handled without problems (a figure that can probably be increased).

See Detailed map for a map of the code as it is now.

Taxonomy templates simplified

සංස්කරණය

"Duplicate" templates – templates with essentially the same function but different names – were previously needed to avoid loops forbidden in the template language. These are no longer necessary. This allows a major simplification to taxonomy templates. Previously, a variant taxonomy template that obtained some of its information from another taxonomy template (the "same as" taxonomy template) had to contain a different internal template (such as Taxon variant rather than Don't edit this line).

(Had both the variant and "same as" taxonomy templates contained Don't edit this line {{{machine code|}}}, then to obtain, for example, the value of parent for a variant taxonomy template would have involved the variant taxonomy template calling Don't edit this line parent, which then called Don't edit this line parent again, this time from the "same as" taxonomy template. This would have created a loop, which is forbidden. By converting to Lua, the loop problem has been avoided.)

  • All taxonomy templates should now begin
{{Don't edit this line {{{machine code|}}}
  • Any taxonomy template can contain |same_as=; any information missing from that taxonomy template (i.e. blank) will be looked up in the "same as" taxonomy template. This only works once, i.e. the "same as" taxonomy template must not contain a |same_as=.
Hence /skip and /? templates are now coded using Don't edit this line and same_as.
  • The |{{{1}}} bit in a taxonomy template has long been redundant to the use of the machine code parameter, but until late 2016 was still used in a few places. These uses have all been removed, so this |{{{1}}} is no longer needed, and a bot has removed all occurrences from taxonomy templates.