Template:Country showdata: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Aleenf1 |
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]. | 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><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]]. | |||
'''''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 | ! Parameter name !! Value !! Meaning | ||
|- | |- | ||
| alias | | <tt>alias</tt> | ||
| {{{alias}}} | | {{#if: {{{alias|}}} | <tt>{{{alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }} | ||
| | | Main article name ([[{{{alias}}}]]) | ||
|- | |- | ||
| | | <tt>flag alias</tt> | ||
| {{{ | | {{#if: {{{flag alias|}}} | <tt>{{{flag alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }} | ||
| | | Image name ([[:Image:{{{flag alias}}}]], shown at right) | ||
{{#if: {{{shortname alias|}}} | | |||
<tr> | |||
<td><tt>shortname alias</tt></td> | |||
<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> | |||
</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|}}} | | |||
== | ==Flag variants== | ||
<table class="wikitable"> | |||
<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> }}<!-- | |||
-->{{#if: {{{var2|}}} | <tr><td><tt>{{{var2}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var2}}}}}}|40px|border]]</td></tr> }}<!-- | |||
-->{{#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> }}<!-- | |||
-->{{#if: {{{var5|}}} | <tr><td><tt>{{{var5}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var5}}}}}}|40px|border]]</td></tr> }}<!-- | |||
-->{{#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> }}<!-- | |||
-->{{#if: {{{var8|}}} | <tr><td><tt>{{{var8}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var8}}}}}}|40px|border]]</td></tr> }}<!-- | |||
-->{{#if: {{{var9|}}} | <tr><td><tt>{{{var9}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var9}}}}}}|40px|border]]</td></tr> }}<!-- | |||
--></table> | |||
* <nowiki>{{</nowiki> | }} | ||
{{#if: {{{alias1|}}} | | |||
==Aliases== | |||
* <nowiki>{{</nowiki> | This template can also be used via an ''alias'' name (implemented as a redirect to this template):<!-- | ||
--><table class="wikitable"><!-- | |||
--><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> }}<!-- | |||
-->{{#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> }}<!-- | ||
-->{{#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> </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.