Template:Getalias2

From CivWiki
Revision as of 02:33, 5 June 2021 by Lodish (talk | contribs) (Created page with "{{Country data {{{1|}}}|Getalias2/core|name={{{2|}}}|variant={{{variant|}}}}}<noinclude> {{Documentation}} </noinclude>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{{}}}

Template documentation[view] [edit] [history] [purge]

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|Columbia|flag alias|variant=firstempire}}Columbia Flag.GIF (the value of |flag alias-first empire=)
  • {{getalias2|Columbia|flag alias|variant=foo}}NewColumbiaFlag.png (non-existent variant; returns the value of |flag alias= as fallback)