Template:Infobox/NPC/Universal/FormatFields

From Ultima Codex
Jump to navigation Jump to search


Usage[edit]

Currently, this is for getting the field that gives the species in the infobox (and should only be used by Template:Infobox/NPC/Universal) as well as the category for the article.

species
If {{{speciesU}}} is non-blank it returns it raw. Otherwise, if {{{species}}} is “unknown” (case-insensitive) it returns “unknown”. Otherwise, defaults to the old behavior, which is processing {{{species}}} through {{{NameFormat/FormatSpecies}}} and linking it.
category
If {{{category}}} is not blank, it is returned as a category link. Otherwise, if species if “unknown” (case-insensitive) nothing is returned. If {{{speciesU}}} is non-blank, nothing is returned. Otherwise, it defaults to the old behavior and {{{species}}} is made into a category link and returned.

Parameters[edit]

All parameters are required and should probably have the given defaults.

1
Should be given as {{{species|human}}}
2
Should be given as {{{speciesU|}}}
3
Should be given as {{{category|}}}
4
Should be given as “species” or “category”