Template:Getalias2
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
→{{getalias2|Mir|flag alias}}
MirFlag.png
(the value of|flag alias=
in {{Country data Mir}})
→{{getalias2|Georgia (U.S. state)|shortname alias}}
Template:Country data Georgia (U.S. state)
(the value of|shortname alias=
in {{Country data Georgia (U.S. state)}})
→{{getalias2|Nepal|border}}
Template:Country data Nepal
(nothing, since|border=
is set to nothing in {{Country data Nepal}})
→{{getalias2|Lusitania|border}}
{{{border}}}
(no|border=
parameter is defined in {{Country data Lusitania}})
→{{getalias2|Nepal|size}}
Template:Country data Nepal
(in {{Country data Nepal}}, the{{{size}}}
parameter is passed through with fallback value 23x20px)
→{{getalias2|Lusitania|size}}
(in {{Country data Lusitania}}, the
{{{size}}}
parameter is passed through with empty fallback value)
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)