Template:Getalias2: Difference between revisions

From CivWiki
Jump to navigation Jump to search
Content added Content deleted
(Created page with "{{Country data {{{1|}}}|Getalias2/core|name={{{2|}}}|variant={{{variant|}}}}}<noinclude> {{Documentation}} </noinclude>")
 
(No difference)

Latest revision as of 02:33, 5 June 2021

{{{}}}

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)