Template:Country showdata: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Aleenf1
m (Reverted to revision null by Andrwsc. TWINKLE)
meta>Andrwsc
(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]. See [[Template:Country data Germany]] for an example usage.
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}}''


--><includeonly>
<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]].
:''This is the documentation / testpage for '''Template:{{PAGENAME}}'''. It is automatically created by calling {{lts|Country showdata}}''


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).
'''''Please <span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}|action=purge}} purge the cache]</span> after making any changes to this template.'''''


[[Image:{{{flag alias}}}|thumb|See also: [[Flag of {{{alias}}}]]]]
==Standard parameters==
[[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 [<span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}|action=edit}} edit]</span>] !! Meaning !! Used for
! Parameter name !! Value !! Meaning
|-
|-
| alias
| <tt>alias</tt>
| {{{alias}}}
| {{#if: {{{alias|}}} | <tt>{{{alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }}
| Name of the Wikipedia article for the country ([[{{{alias}}}]])
| Main article name ([[{{{alias}}}]])
| {{tl|flag}}, {{tl|flagcountry}} ({{tl|flagicon}} for [[alt attribute]])
|-
|-
| shortname alias
| <tt>flag alias</tt>
| {{{shortname alias}}}
| {{#if: {{{flag alias|}}} | <tt>{{{flag alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }}
| A short common name, such as "United States" instead of "United States of America".
| Image name ([[:Image:{{{flag alias}}}]], shown at right)
| {{tl|flagcountry}}
{{#if: {{{shortname alias|}}} |
|-
<tr>
| flag alias
<td><tt>shortname alias</tt></td>
| {{{flag alias}}}
<td><tt>{{{shortname alias}}}</tt></td>
| Name of country's flag image (shown on the right)
<td>''(optional)'' Display name to be used for the wikilink,<br/>if <tt>alias</tt> is a disambiguation page, for example</td>
| {{tl|flagicon}}, {{tl|flag}}, {{tl|flagcountry}}
</tr>
}}<!--
-->{{#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|}}} |
== Testcalls ==
==Flag variants==
 
<table class="wikitable">
countryname is '''"{{{countryname}}}"''' (must match XXX in Template:Country data XXX for the testcalls!)
<tr><th>Label</th><th>Flag image (40px)</th></tr>
 
{{#if: {{{var1|}}} | <tr><td><tt>{{{var1}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var1}}}}}}|40px|border]]</td></tr> }}<!--
* <nowiki>{{</nowiki>[[template:flag|flag]]|{{{countryname}}}<nowiki>}}</nowiki> = <!--
-->{{#if: {{{var2|}}} | <tr><td><tt>{{{var2}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var2}}}}}}|40px|border]]</td></tr> }}<!--
  -->{{flag| {{{countryname}}} }}
-->{{#if: {{{var3|}}} | <tr><td><tt>{{{var3}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var3}}}}}}|40px|border]]</td></tr> }}<!--
 
-->{{#if: {{{var4|}}} | <tr><td><tt>{{{var4}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var4}}}}}}|40px|border]]</td></tr> }}<!--
* <nowiki>{{</nowiki>[[template:flagcountry|flagcountry]]|{{{countryname}}}<nowiki>}}</nowiki> = <!--
-->{{#if: {{{var5|}}} | <tr><td><tt>{{{var5}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var5}}}}}}|40px|border]]</td></tr> }}<!--
  -->{{flagcountry| {{{countryname}}} }}
-->{{#if: {{{var6|}}} | <tr><td><tt>{{{var6}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var6}}}}}}|40px|border]]</td></tr> }}<!--
 
-->{{#if: {{{var7|}}} | <tr><td><tt>{{{var7}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var7}}}}}}|40px|border]]</td></tr> }}<!--
* <nowiki>{{</nowiki>[[template:flagicon|flagicon]]|{{{countryname}}}<nowiki>}}</nowiki> = <!--
-->{{#if: {{{var8|}}} | <tr><td><tt>{{{var8}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var8}}}}}}|40px|border]]</td></tr> }}<!--
  -->{{flagicon| {{{countryname}}} }}
-->{{#if: {{{var9|}}} | <tr><td><tt>{{{var9}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var9}}}}}}|40px|border]]</td></tr> }}<!--
 
--></table>
* <nowiki>{{</nowiki>[[template:flag|flag]]|{{{countryname}}}|name=special name<nowiki>}}</nowiki> = <!--
}}
  -->{{flag| {{{countryname}}} | name=special name}}
{{#if: {{{alias1|}}} |
 
==Aliases==
* <nowiki>{{</nowiki>[[template:flagicon|flagicon]]|{{{countryname}}}|size=40px<nowiki>}}</nowiki> = <!--
This template can also be used via an ''alias'' name (implemented as a redirect to this template):<!--
  -->{{flagicon| {{{countryname}}} | size=40px}}
--><table class="wikitable"><!--
 
--><tr><th>Alias name</th><th>{{tlx|flag|''alias''}} output</th><th>{{tlx|flagcountry|''alias''}} output</th></tr>
''Please <span class="plainlinks">[{{fullurl:{{FULLPAGENAMEE}}|action=purge}} purge the cache]</span> if any testcall doesn't match the current parameter values.''<!--
{{#if: {{{alias1|}}} | <tr><td><tt>{{{alias1}}}</tt></td><td>{{flag|{{{alias1}}}}}</td><td>{{flagcountry|{{{alias1}}}}}</td></tr> }}<!--
 
-->{{#if: {{{alias2|}}} | <tr><td><tt>{{{alias2}}}</tt></td><td>{{flag|{{{alias2}}}}}</td><td>{{flagcountry|{{{alias2}}}}}</td></tr> }}<!--
-->[[category:country data templates|{{{countryname}}}]]<!--
-->{{#if: {{{alias3|}}} | <tr><td><tt>{{{alias3}}}</tt></td><td>{{flag|{{{alias3}}}}}</td><td>{{flagcountry|{{{alias3}}}}}</td></tr> }}<!--
-->{{#if: {{{shortname alias|}}} |
-->{{#if: {{{alias4|}}} | <tr><td><tt>{{{alias4}}}</tt></td><td>{{flag|{{{alias4}}}}}</td><td>{{flagcountry|{{{alias4}}}}}</td></tr> }}<!--
-->{{#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>&nbsp;</td><td>{{flag|{{{related1}}}}}</td></tr><!--
-->{{#if: {{{related2|}}} | <tr><td>[[Template:Country data {{{related2}}}]]</td><td>&nbsp;</td><td>{{flag|{{{related2}}}}}</td></tr> }}<!--
-->{{#if: {{{related3|}}} | <tr><td>[[Template:Country data {{{related3}}}]]</td><td>&nbsp;</td><td>{{flag|{{{related3}}}}}</td></tr> }}<!--
-->{{#if: {{{related4|}}} | <tr><td>[[Template:Country data {{{related4}}}]]</td><td>&nbsp;</td><td>{{flag|{{{related4}}}}}</td></tr> }}<!--
-->{{#if: {{{related5|}}} | <tr><td>[[Template:Country data {{{related5}}}]]</td><td>&nbsp;</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|{{{countryname}}}]]  
     || [[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.