Template:Getalias2
{{{}}}
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|United Kingdom|flag alias}}Flag of the United Kingdom (1-2).svg(the value of|flag alias=in {{Country data United Kingdom}})→{{getalias2|Georgia (U.S. state)|shortname alias}}Georgia(the value of|shortname alias=in {{Country data Georgia (U.S. state)}})→{{getalias2|Nepal|border}}(nothing, since|border=is set to nothing in {{Country data Nepal}})→{{getalias2|Russia|border}}{{{border}}}(no|border=parameter is defined in {{Country data Russia}})→{{getalias2|Nepal|size}}(in {{Country data Nepal}}, the{{{size}}}parameter is passed through with fallback value 23x20px)→{{getalias2|Russia|size}}(in {{Country data Russia}}, 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|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 (1-2).svg(non-existent variant; returns the value of|flag alias=as fallback)
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.