Difference between revisions of "Template:Country showdata"

From Chevy Wiki
Jump to navigation Jump to search
(uploaded "Image:CHP 4th gen Camaro in traditional colors.JPG": Importing image file)
m (1 revision)
 
Line 1: Line 1:
{{db-g6 |bot={{{bot|}}}| wording = it is holding up a page move or page history merge that is non-controversial or consensual, for instance reversing a redirect, or removing a disambiguation page that only points to a single article{{#if:{{{1|}}}
<noinclude>{{pp-semi-template|small=yes}}</noinclude><includeonly>
|. The page to be moved to this name is ''[[{{{1}}}]]''. <span class="plainlinks"> ([{{fullurl:Special:Movepage|wpOldTitle={{urlencode:{{{1|}}}}}&wpNewTitle={{FULLPAGENAMEE}}&wpReason={{urlencode:{{{2|[[WP:CSD#G6|Housekeeping page move]]}}}}}}} link to perform this move]){{#if:{{{2|}}}|&#32;Reason for move: {{{2}}}}}</span>}}|summary={{#if:{{{summary|}}}|{{{summary}}}|Deleted to make room for an uncontroversial page move}}|category=}}<noinclude>
__NOEDITSECTION__
{{pp-template}}
{{#switch: {{PROTECTIONLEVEL:edit}} | sysop={{pp-template|small=yes}} | autoconfirmed={{pp-semi-template|small=yes}} }}
==Usage==
<div class="template-documentation">
Place '''{{tlx|db-move|PAGE TO BE MOVED HERE|REASON FOR MOVE}}''' on the page to be deleted so that the deleting admin knows which page is to be moved to the title and can perform the move.
<div style="font-size: 1.5em; border-bottom: 1px solid #aaa;"><span class="mw-headline">Template documentation</span></div>
''This is the documentation for '''Template:{{PAGENAME}}'''. It is automatically generated by [[Template:Country showdata]]''


This template places the page in [[:Category:Candidates for speedy deletion]].
<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.
[[Category:Speedy deletion templates|G06move]]


</noinclude><includeonly>{{{category|[[Category:Candidates for speedy deletion]]}}} </includeonly>
<table class="tmbox"><tr><td class="mbox-text">This template is within the scope of '''[[Wikipedia:WikiProject Flag Template|WikiProject Flag Template]]''', a collaborative effort to maintain flag templates on Wikipedia.  A more thorough discussion of the flag template system, including parameters not described here, can be found on the project page.</td></tr></table>
 
'''''Please {{purge|purge the cache}} after making any changes to this template.'''''
 
[[Image:{{{flag alias|Sin bandera.svg}}}|thumb|{{#ifexist: {{{alt attribute}}} | See also: [[{{{alt attribute}}}]] |{{#ifexist: Flag of {{{alias}}} | See also: [[Flag of {{{alias}}}]] | }} }}]]
==Standard parameters==
{| class="wikitable"
! Parameter name !! Value !! Meaning
|-
| <tt>alias</tt>
| {{#if: {{{alias|}}} | <tt>{{{alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }}
| Main article name ([[{{{alias}}}]])
{{#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, if <tt>alias</tt> is a disambiguated article name, for example</td>
</tr>
}}
|-
| <tt>flag alias</tt>
| {{#if: {{{flag alias|}}} | <tt>{{{flag alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }}
| Image name ([[:Image:{{{flag alias}}}]], shown above right)
{{#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 alias-naval|}}}}}} |
==Flag variants==
{{#ifexist: {{{alt attribute}}} | {{details|{{{alt attribute}}}}} | {{#ifexist: Flag of {{{alias}}} | {{details|Flag of {{{alias}}}}} | }} }}
<table class="wikitable">
<tr><th>Label</th><th>Flag image (40px)</th><th>Image name</th></tr>
{{#if: {{{var1|}}} | <tr><td><tt>{{{var1}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var1}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var1}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var2|}}} | <tr><td><tt>{{{var2}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var2}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var2}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var3|}}} | <tr><td><tt>{{{var3}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var3}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var3}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var4|}}} | <tr><td><tt>{{{var4}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var4}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var4}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var5|}}} | <tr><td><tt>{{{var5}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var5}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var5}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var6|}}} | <tr><td><tt>{{{var6}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var6}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var6}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var7|}}} | <tr><td><tt>{{{var7}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var7}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var7}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var8|}}} | <tr><td><tt>{{{var8}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var8}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var8}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{var9|}}} | <tr><td><tt>{{{var9}}}</tt></td><td align=center>[[Image:{{{flag alias-{{{var9}}}}}}|40px|border]]</td><td><tt>{{{flag alias-{{{var9}}}}}}</tt></td></tr> }}<!--
-->{{#if: {{{flag alias-naval|}}} | <tr><td><tt>naval</tt></td><td align=center>[[Image:{{{flag alias-naval}}}|40px|border]]</td><td><tt>{{{flag alias-naval}}}</tt></td></tr> }}<!--
-->{{#if: {{{flag alias-air force|}}} | <tr><td><tt>air force</tt></td><td align=center>[[Image:{{{flag alias-air force}}}|40px|border]]</td><td><tt>{{{flag alias-air force}}}</tt></td></tr> }}<!--
-->{{#if: {{{flag alias-army|}}} | <tr><td><tt>army</tt></td><td align=center>[[Image:{{{flag alias-army}}}|40px|border]]</td><td><tt>{{{flag alias-army}}}</tt></td></tr> }}<!--
--></table>
}}
{{#if: {{{flag alias-naval|}}}{{{flag alias-air force|}}}{{{flag alias-army|}}} |
==Military ensigns==
{{#if: {{{flag alias-naval|}}} |
This template includes a naval ensign flag variant that can be used with [[Template:Navy]]:
* <tt><nowiki>{{navy|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{navy|{{{templatename|{{{alias}}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|naval}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|naval}}
}}
{{#if: {{{flag alias-air force|}}} |
This template includes an air force ensign flag variant that can be used with [[Template:Air force]]:
* <tt><nowiki>{{air force|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{air force|{{{templatename|{{{alias}}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|air force}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|air force}}
}}
{{#if: {{{flag alias-army|}}} |
This template includes an army ensign flag variant that can be used with [[Template:Army]]:
* <tt><nowiki>{{army|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{army|{{{templatename|{{{alias}}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|army}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|army}}
}} }}
{{#if: {{{redir1|}}} |
==Redirect aliases==
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: {{{redir1|}}} | <tr><td><tt>{{{redir1}}} (</tt><span class="plainlinks">[{{fullurl:Template:Country data {{{redir1}}}|redirect=no}} view]</span><tt>)</tt></td><td>{{flag|{{{redir1}}}}}</td><td>{{flagcountry|{{{redir1}}}}}</td></tr> }}<!--
-->{{#if: {{{redir2|}}} | <tr><td><tt>{{{redir2}}} (</tt><span class="plainlinks">[{{fullurl:Template:Country data {{{redir2}}}|redirect=no}} view]</span><tt>)</tt></td><td>{{flag|{{{redir2}}}}}</td><td>{{flagcountry|{{{redir2}}}}}</td></tr> }}<!--
-->{{#if: {{{redir3|}}} | <tr><td><tt>{{{redir3}}} (</tt><span class="plainlinks">[{{fullurl:Template:Country data {{{redir3}}}|redirect=no}} view]</span><tt>)</tt></td><td>{{flag|{{{redir3}}}}}</td><td>{{flagcountry|{{{redir3}}}}}</td></tr> }}<!--
-->{{#if: {{{redir4|}}} | <tr><td><tt>{{{redir4}}} (</tt><span class="plainlinks">[{{fullurl:Template:Country data {{{redir4}}}|redirect=no}} view]</span><tt>)</tt></td><td>{{flag|{{{redir4}}}}}</td><td>{{flagcountry|{{{redir4}}}}}</td></tr> }}<!--
-->{{#if: {{{redir5|}}} | <tr><td><tt>{{{redir5}}} (</tt><span class="plainlinks">[{{fullurl:Template:Country data {{{redir5}}}|redirect=no}} view]</span><tt>)</tt></td><td>{{flag|{{{redir5}}}}}</td><td>{{flagcountry|{{{redir5}}}}}</td></tr> }}<!--
--></table>
}}
==Example usage==
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{{alias}}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}}}<!--
-->{{#if: {{{shortname alias|}}} |
* <tt><nowiki>{{flagcountry|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flagcountry|{{{templatename|{{{alias}}}}}}}} }}<!--
-->{{#if: {{{var1|}}} |
;Using a flag variant
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{{alias}}}}}}|{{{var1}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|{{{var1}}}}}
}}<!--
-->{{#if: {{{redir1|}}} |
;Using a redirect alias
* <tt><nowiki>{{flagicon|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{redir1}}}}}
* <tt><nowiki>{{flagcountry|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flagcountry|{{{redir1}}}}}
* <tt><nowiki>{{flag|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flag|{{{redir1}}}}}
}}
{{#if: {{{related1|}}} |
==Related templates==
Please see the following related <tt>country_data</tt> templates:
*[[Template:Country data {{{related1}}}]]<span style="position:absolute; left:32em;">{{flag|{{{related1}}}}}</span><!--
-->{{#if: {{{related2|}}} |
*[[Template:Country data {{{related2}}}]]<span style="position:absolute; left:32em;">{{flag|{{{related2}}}}}</span> }}<!--
-->{{#if: {{{related3|}}} |
*[[Template:Country data {{{related3}}}]]<span style="position:absolute; left:32em;">{{flag|{{{related3}}}}}</span> }}<!--
-->{{#if: {{{related4|}}} |
*[[Template:Country data {{{related4}}}]]<span style="position:absolute; left:32em;">{{flag|{{{related4}}}}}</span> }}<!--
-->{{#if: {{{related5|}}} |
*[[Template:Country data {{{related5}}}]]<span style="position:absolute; left:32em;">{{flag|{{{related5}}}}}</span> }}<!--
-->}}
{{#ifexist: Template:{{PAGENAME}}/doc |
==Other information==
{{/doc}}
}}
[[Category:Country data templates|{{{templatename|{{{alias}}}}}}]]
{{#if: {{{shortname alias|}}} | [[Category:Country data templates with distinct shortname|{{{templatename|{{{alias}}}}}}]] }}
{{#ifeq: {{PAGENAME}} | Country data {{{alias}}} | |  {{#ifeq: {{PAGENAME}} | Country data {{{shortname alias}}} | | [[Category:Country data templates with distinct template name]] }} }}
</div>
</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 15:11, 3 February 2009

[edit] Template-info.svg Template documentation

This template is used for documenting country data meta-templates used by the flag template system. The output of this template can be seen by directly viewing any of the templates in Category:Country data templates.

See Wikipedia:WikiProject Flag Template for the main documentation and discussion page for the flag template system.

Usage

This template is automatically invoked by the standard syntax of a country data template:

{{ {{{1<noinclude>|country showdata</noinclude>}}}
| alias = Countryname
| flag alias = Flag of Countryname.svg
| size = {{{size|}}}
| name = {{{name|}}}
}}

The first parameter to a country data template is usually the name of a formatting meta-template. For example, Template:Flag uses Template:Country flag2 to actually render the flag icon and wikilink. If the first parameter is missing, which is the case when a country data template is viewed directly, the template code fragment {{{1<noinclude>|country showdata</noinclude>}}} ensures that this template will be used as the default first parameter. This technique ensures that country data templates are "self-documenting" if they use the standard syntax.

Additional parameters

Many country data templates require additional documentation beyond the standard mandatory alias and flag alias parameters. This template will automatically document standard optional parameters (such as shortname alias and/or alt attribute) if present, and can document unique optional parameters (such as flag variants) if instructed to. This latter method utilizes documentation-specific parameters in the country data template to activate the additional output from this template. These documentation parameters are set off from the rest of the parameters in the country data template by a <noinclude> section:

<noinclude>
| var1 = ...
| redir1 = ...
| related1 = ...
</noinclude>

Flag variants

Flag variants are added to a country data template by the inclusion of one or more flag alias-label parameters, where each label is a unique identifier that is subsequently used as an input parameter to {{flag|...}}, {{flagicon|...}}, etc. To document these flag variants, use the varN documentation parameters to identify each label.

For example, Template:Country data Seychelles identifies three flag variants (in addition to the current flag) with the following code:

| flag alias-1976 = Flag of the Seychelles 1976.svg
| flag alias-1977 = Flag of the Seychelles 1977.svg
| flag alias-colonial = Government Ensign of the United Kingdom.svg

These three variants are documented by the following code segment later in the template:

<noinclude>
| var1 = 1976
| var2 = 1977
| var3 = colonial
...
</noinclude>

Up to nine flag variants can be documented by this method (using var1 to var9). If more are present (and currently, only Template:Country data United States has more than nine flag variants), these can be listed on a separate documentation subpage as described below.

Note that you do not have to use a varN parameter for the standard optional variant label naval (used for the country's naval ensign). If present, it will automatically be documented.

Redirect aliases

Many country data templates have alias names that can be used instead of the usual country name with all of the main flag templates. These are usually, but not exclusively, standard country code abbreviations such as those specifed in ISO 3166-1 alpha-3 or by the IOC or FIFA. These are implemented as redirects, and are listed in Category:Country data redirects.

For example, Template:Country data DEU and Template:Country data GER both redirect to Template:Country data Germany, because DEU is the ISO code and GER is the IOC and FIFA code for Germany. Therefore, {{flagicon|DEU}}, {{flagicon|GER}}, and {{flagicon|Germany}} all have the same result. These redirect aliases are documented by the following template code fragment:

<noinclude>
...
| redir1 = DEU
| redir2 = GER
...
</noinclude>

Related templates

Several country data templates are used for alternate forms to the common country data template for the nation, usually but not exclusively for historic nations. Pointers to these alternate templates are useful additions to the template documentation so that editors can use the correct template for their specific purposes.

For example, Template:Country data Serbia and Montenegro includes the following code to document three other related country data templates:

<noinclude>
...
| related1 = Serbia
| related2 = Montenegro
| related3 = FR Yugoslavia
...
</noinclude>

Additional documentation

For situations where the automatic documentation method is not completely adequate, additional documentation can be displayed by country showdata. Simply create a documentation subpage (named as Template:Country data Countryname/doc) with the additional material, and it will be transcluded after all other output sections.

For example:

af:Sjabloon:Land vertoondata bn:Template:Country showdata dv:Template:Country showdata es:Plantilla:Mostrar geodatos fa:الگو:Country showdata fr:modèle:Country showdata ka:თარგი:Country showdata kk:Үлгі:Country showdata ko:틀:나라자료/설명문서 ku:Şablon:Country showdata lo:ແມ່ແບບ:Country showdata lt:Šablonas:Country showdata ms:Templat:Country showdata ro:Format:Country showdata sl:Predloga:Prikažipodatke države sh:Template:Country showdata vi:Tiêu bản:Country showdata