टेम्पलेट:Select species

विकिपीडिया से

species

This is an auxiliary template for use in {{Speciesbox}} (and perhaps others). It has no direct use. Its purpose in that context is to select a specific epithet from the first of the three possible parameters which contain it.

  • The first parameter should have been given the value of the specific epithet or be empty. If it has a value, this will be the result (and the second and third parameter values will be ignored).
  • The second parameter should have been given the value of the full taxon name or be empty. If it has a value, the result will be this value after the first word has been removed (and the third parameter value will be ignored).
  • The third parameter should have been given the value of the page name (page title) or be empty. If it has a value, the result will be this value after the first word has been removed.

Examples of usage, assuming that it is used from a page whose name is "Quercus robur":

  • {{select species|robur|Quercus robur|{{PAGENAME}} }} => robur
  • {{select species||Quercus robur|{{PAGENAME}} }} => robur
  • {{select species|||{{PAGENAME}} }} => robur

Typically in {{Speciesbox}} it will be used in the following way, to select the first non-empty string obtained from the value of the species parameter, the value of specific epithet of the taxon parameter and the value of the specific epithet of the page name.

  • {{select species|{{{species|}}|{{{taxon|}}}|{{PAGENAME}} }}