Template:Country showdata: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(major update to help better document these templates) |
|||
Line 1: | Line 1: | ||
<noinclude> |
<noinclude> |
||
This template is used for documenting [http://en.wikipedia.org/w/index.php?title=Special%3APrefixindex&from=Country+data&namespace=10 country data templates] |
This template is used for documenting [http://en.wikipedia.org/w/index.php?title=Special%3APrefixindex&from=Country+data&namespace=10 country data templates]. |
||
</noinclude>< |
</noinclude><includeonly> |
||
<div class="template-documentation" style="background-color:#ecfcf4; border:1px solid #aaa; padding:5px;"> |
|||
<div style="font-size: 1.5em; border-bottom: 1px solid #aaa;">[[Image:Template-info.svg|50px]] <span class="mw-headline">Template documentation</span></div> |
|||
''This is the documentation for '''Template:{{PAGENAME}}'''. It is automatically generated by {{lts|Country showdata}}'' |
|||
<tt>Template:{{PAGENAME}}</tt> is an internal data container not intended to be transcluded directly. It is used indirectly by templates such as <tt>[[Template:flag|flag]]</tt>, <tt>[[Template:flagicon|flagicon]]</tt>, and others. For a more thorough discussion of the flag template system, including parameters not described here, please see [[Wikipedia:WikiProject Flag Template]]. |
|||
--><includeonly> |
|||
:''This is the documentation / testpage for '''Template:{{PAGENAME}}'''. It is automatically created by calling {{lts|Country showdata}}'' |
|||
'''''Please <span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}|action=purge}} purge the cache]</span> after making any changes to this template.''''' |
|||
This template here is a mere data container not to be called directly. It is intended only for indirect use by calling [[template:flagicon]], [[template:flagcountry]] and the like. See [[Wikipedia:WikiProject Flag Template]] (the main documentation/discussion page for the flag templates system). |
|||
==Standard parameters== |
|||
[[Image:{{{flag alias}}}|thumb|See also: [[Flag of {{{alias}}}]]]] |
|||
[[Image:{{{flag alias|Sin bandera.svg}}}|thumb|{{#ifexist: {{{alt attribute}}} | See also: [[{{{alt attribute}}}]] |{{#ifexist: Flag of {{{alias}}} | See also: [[Flag of {{{alias}}}]] | }} }}]] |
|||
{| class="wikitable" |
{| class="wikitable" |
||
! Parameter name !! Value |
! Parameter name !! Value !! Meaning |
||
|- |
|- |
||
| alias |
| <tt>alias</tt> |
||
| {{#if: {{{alias|}}} | <tt>{{{alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }} |
|||
| {{{alias}}} |
|||
| |
| Main article name ([[{{{alias}}}]]) |
||
| {{tl|flag}}, {{tl|flagcountry}} ({{tl|flagicon}} for [[alt attribute]]) |
|||
|- |
|- |
||
| |
| <tt>flag alias</tt> |
||
| {{#if: {{{flag alias|}}} | <tt>{{{flag alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }} |
|||
| {{{shortname alias}}} |
|||
| Image name ([[:Image:{{{flag alias}}}]], shown at right) |
|||
| A short common name, such as "United States" instead of "United States of America". |
|||
{{#if: {{{shortname alias|}}} | |
|||
| {{tl|flagcountry}} |
|||
<tr> |
|||
|- |
|||
<td><tt>shortname alias</tt></td> |
|||
| flag alias |
|||
<td><tt>{{{shortname alias}}}</tt></td> |
|||
<td>''(optional)'' Display name to be used for the wikilink,<br/>if <tt>alias</tt> is a disambiguation page, for example</td> |
|||
| Name of country's flag image (shown on the right) |
|||
</tr> |
|||
| {{tl|flagicon}}, {{tl|flag}}, {{tl|flagcountry}} |
|||
}}<!-- |
|||
-->{{#if: {{{alt attribute|}}} | |
|||
<tr> |
|||
<td><tt>alt attribute</tt></td> |
|||
<td><tt>{{{alt attribute}}}</tt></td> |
|||
<td>''(optional)'' [[alt attribute]] for flag image</td> |
|||
</tr> |
|||
}} |
|||
|} |
|} |
||
{{#if: {{{var1|}}} | |
|||
== |
==Flag variants== |
||
<table class="wikitable"> |
|||
<tr><th>Label</th><th>Flag image (40px)</th></tr> |
|||
countryname is '''"{{{countryname}}}"''' (must match XXX in Template:Country data XXX for the testcalls!) |
|||
{{#if: {{{var1|}}} | <tr><td><tt>{{{var1}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var1}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
-->{{#if: {{{var2|}}} | <tr><td><tt>{{{var2}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var2}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
* <nowiki>{{</nowiki>[[template:flag|flag]]|{{{countryname}}}<nowiki>}}</nowiki> = <!-- |
|||
-->{{#if: {{{var3|}}} | <tr><td><tt>{{{var3}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var3}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
-->{{flag| {{{countryname}}} }} |
|||
-->{{#if: {{{var4|}}} | <tr><td><tt>{{{var4}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var4}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
-->{{#if: {{{var5|}}} | <tr><td><tt>{{{var5}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var5}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
* <nowiki>{{</nowiki>[[template:flagcountry|flagcountry]]|{{{countryname}}}<nowiki>}}</nowiki> = <!-- |
|||
-->{{#if: {{{var6|}}} | <tr><td><tt>{{{var6}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var6}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
-->{{flagcountry| {{{countryname}}} }} |
|||
-->{{#if: {{{var7|}}} | <tr><td><tt>{{{var7}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var7}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
-->{{#if: {{{var8|}}} | <tr><td><tt>{{{var8}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var8}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
* <nowiki>{{</nowiki>[[template:flagicon|flagicon]]|{{{countryname}}}<nowiki>}}</nowiki> = <!-- |
|||
-->{{#if: {{{var9|}}} | <tr><td><tt>{{{var9}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var9}}}}}}|40px|border]]</td></tr> }}<!-- |
|||
-->{{flagicon| {{{countryname}}} }} |
|||
--></table> |
|||
}} |
|||
* <nowiki>{{</nowiki>[[template:flag|flag]]|{{{countryname}}}|name=special name<nowiki>}}</nowiki> = <!-- |
|||
{{#if: {{{alias1|}}} | |
|||
==Aliases== |
|||
This template can also be used via an ''alias'' name (implemented as a redirect to this template):<!-- |
|||
* <nowiki>{{</nowiki>[[template:flagicon|flagicon]]|{{{countryname}}}|size=40px<nowiki>}}</nowiki> = <!-- |
|||
--><table class="wikitable"><!-- |
|||
-->{{flagicon| {{{countryname}}} | size=40px}} |
|||
--><tr><th>Alias name</th><th>{{tlx|flag|''alias''}} output</th><th>{{tlx|flagcountry|''alias''}} output</th></tr> |
|||
{{#if: {{{alias1|}}} | <tr><td><tt>{{{alias1}}}</tt></td><td>{{flag|{{{alias1}}}}}</td><td>{{flagcountry|{{{alias1}}}}}</td></tr> }}<!-- |
|||
''Please <span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}|action=purge}} purge the cache]</span> if any testcall doesn't match the current parameter values.''<!-- |
|||
-->{{#if: {{{alias2|}}} | <tr><td><tt>{{{alias2}}}</tt></td><td>{{flag|{{{alias2}}}}}</td><td>{{flagcountry|{{{alias2}}}}}</td></tr> }}<!-- |
|||
-->{{#if: {{{alias3|}}} | <tr><td><tt>{{{alias3}}}</tt></td><td>{{flag|{{{alias3}}}}}</td><td>{{flagcountry|{{{alias3}}}}}</td></tr> }}<!-- |
|||
-->[[category:country data templates|{{{countryname}}}]]<!-- |
|||
-->{{#if: {{{alias4|}}} | <tr><td><tt>{{{alias4}}}</tt></td><td>{{flag|{{{alias4}}}}}</td><td>{{flagcountry|{{{alias4}}}}}</td></tr> }}<!-- |
|||
-->{{#if: {{{shortname alias|}}} | |
|||
-->{{#if: {{{alias5|}}} | <tr><td><tt>{{{alias5}}}</tt></td><td>{{flag|{{{alias5}}}}}</td><td>{{flagcountry|{{{alias5}}}}}</td></tr> }}<!-- |
|||
--></table> |
|||
}} |
|||
==Example usage== |
|||
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{{alias}}}}}}}}<!-- |
|||
-->{{#if: {{{var1|}}} | |
|||
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{{alias}}}}}}|{{{var1}}}}} }} |
|||
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}}}<!-- |
|||
-->{{#if: {{{alias1|}}} | |
|||
* <tt><nowiki>{{flagicon|</nowiki>{{{alias1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{alias1}}}}}<!-- |
|||
-->{{#if: {{{var1|}}} | |
|||
* <tt><nowiki>{{flagicon|</nowiki>{{{alias1}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{alias1}}}|{{{var1}}}}} }} }} |
|||
* <tt><nowiki>{{flagcountry|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flagcountry|{{{templatename|{{{alias}}}}}}}}<!-- |
|||
-->{{#if: {{{alias1|}}} | |
|||
* <tt><nowiki>{{flagcountry|</nowiki>{{{alias1}}}<nowiki>}}</nowiki></tt> → {{flagcountry|{{{alias1}}}}}<!-- |
|||
-->}} |
|||
{{#if: {{{related1|}}} | |
|||
==Related templates== |
|||
Please see the following related <tt>country_data</tt> templates: |
|||
<table style="background-color:#ecfcf4"> |
|||
<tr><td>[[Template:Country data {{{related1}}}]]</td><td> </td><td>{{flag|{{{related1}}}}}</td></tr><!-- |
|||
-->{{#if: {{{related2|}}} | <tr><td>[[Template:Country data {{{related2}}}]]</td><td> </td><td>{{flag|{{{related2}}}}}</td></tr> }}<!-- |
|||
-->{{#if: {{{related3|}}} | <tr><td>[[Template:Country data {{{related3}}}]]</td><td> </td><td>{{flag|{{{related3}}}}}</td></tr> }}<!-- |
|||
-->{{#if: {{{related4|}}} | <tr><td>[[Template:Country data {{{related4}}}]]</td><td> </td><td>{{flag|{{{related4}}}}}</td></tr> }}<!-- |
|||
-->{{#if: {{{related5|}}} | <tr><td>[[Template:Country data {{{related5}}}]]</td><td> </td><td>{{flag|{{{related5}}}}}</td></tr> }}<!-- |
|||
--></table> |
|||
}} |
|||
{{#ifexist: Template:{{PAGENAME}}/doc | |
|||
==Other information== |
|||
{{/doc}} |
|||
}} |
|||
[[Category:Country data templates|{{{templatename|{{{alias}}}}}}]] |
|||
{{#if: {{{shortname alias|}}} | |
|||
{{#ifeq: {{{alias}}} | {{{shortname alias}}} |
{{#ifeq: {{{alias}}} | {{{shortname alias}}} |
||
|| [[Category:Country data templates with distinct shortname|{{{ |
|| [[Category:Country data templates with distinct shortname|{{{templatename|{{{alias}}}}}}]] |
||
}} |
}} |
||
}} |
|||
}}</includeonly> |
|||
</div> |
|||
</includeonly> |
Revision as of 23:21, 7 August 2007
This template is used for documenting country data templates.