Template:Getalias2/doc

From CivWiki
Revision as of 02:36, 5 June 2021 by Lodish (talk | contribs) (Created page with "{{documentation subpage}} This is a more general version of {{tl|Getalias}}, which can extract any parameter value from a :Category:Country data templates|country data templ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This is a more general version of {{Getalias}}, which can extract any parameter value from a country data template instead of just parameters named "... alias" or "... alias-...".

Examples

Usage with variant

The |variant= parameter can be used to extract a variant parameter value, and returns the main parameter value if the variant parameter is undefined:

  • {{getalias2|United Kingdom|flag alias|variant=civil}}Civil Ensign of the United Kingdom.svg (the value of |flag alias-civil=)
  • {{getalias2|United Kingdom|flag alias|variant=foo}}Flag of the United Kingdom.svg (non-existent variant; returns the value of |flag alias= as fallback)