Template:Country showdata: Difference between revisions

From Hattrick
Jump to navigationJump to search
Jhattara (talk | contribs)
No edit summary
Para Para (talk | contribs)
mNo edit summary
 
(24 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>__NOEDITSECTION__
<includeonly>__NOEDITSECTION__
<div style="clear: both; margin: 1em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 1em;">
<div style="padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex;">
<span style="float: right; margin-left: 5px; background: none !important; padding: 0 !important;">[[{{fullurl:Template:Country showdata|action=edit}} edit]]</span>
<span style="font-weight: bold; font-size: 125%">[[Image:Template-info.png|50px|alt=|link=]] Template documentation</span>
</div>
<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.
<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.
 
__NOTOC__
[[File:{{{flag alias|Unknown.png}}}|thumb]]
[[File:{{{flag alias|Unknown.png}}}|thumb|Icon]]
{{#if: {{{flag full|}}} |[[File:{{{flag full}}}|thumb|Full size flag of {{{alias}}} (alternative)]]|}}
{{#if: {{{flag logo|}}} |[[File:{{{flag logo}}}|thumb|Country logo]]|}}
===Standard parameters===
===Standard parameters===
<table class="wikitable">
<table class="wikitable" style="font-size:92%; margin-right:2em;">
<tr><th>Parameter name</th><th>Value</th><th>Meaning</th>
<tr><th>Parameter name</th><th>Value</th><th>Meaning</th><th>Link</th></tr>
</tr><tr>
<tr><td><tt>name</tt></td>
<td><tt>alias</tt></td>
<td>{{#if: {{{name|}}} | <tt>{{{name}}}</tt> | <span style="color:red">'''undefined!'''</span> }}</td>
<td>{{#if: {{{alias|}}} | <tt>{{{alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }}
<td>Main article name </td><td>([[{{{name}}}]])</td></tr>
<td>Main article name ([[{{{alias}}}]])</td>
{{#if: {{{alias|}}} |
</tr>
<tr><td><tt>alias</tt></td><td><tt>{{{alias}}}</tt></td><td>English name</td><td>-</td></tr>}}
<tr>
<tr><td><tt>flag alias</tt></td>
<td><tt>flag alias</tt></td>
<td>{{#if: {{{flag alias|}}} | <tt>{{{flag alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }}</td>
<td>{{#if: {{{flag alias|}}} | <tt>{{{flag alias}}}</tt> | <span style="color:red">'''undefined!'''</span> }}</td>
<td>Image name ([[:File:{{{flag alias}}}]], shown above right)</td>
<td>Flag icon</td><td>([[:File:{{{flag alias}}}]])</td></tr>
{{#if: {{{flag full|}}} | <tr><td><tt>flag full</tt></td><td><tt>{{{flag full}}}</tt></td><td>Full size flag</td><td>([[:File:{{{flag full}}}]])</td></tr> |}}
{{#if: {{{flag logo|}}} | <tr><td><tt>flag logo</tt></td><td><tt>{{{flag logo}}}</tt><td>"Ball" logo flag</td><td>([[:File:{{{flag logo}}}]])</td></tr> |}}</td>
 
</table>
====Example usage====
<table>
<tr><td>* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → </td><td>{{flag|{{{templatename|{{{alias}}}}}}}}</td></tr>
<tr><td>* <tt><nowiki>{{flaglink|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → </td><td>{{flaglink|{{{templatename|{{{alias}}}}}}}}</td></tr>
<tr><td>* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → </td><td>{{flagicon|{{{templatename|{{{alias}}}}}}}}</td></tr>
{{#if: {{{flag full|}}} |<tr><td> * <tt><nowiki>{{flagfull|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|showlink}}</nowiki></tt> → </td><td>{{flagfull|{{{templatename|{{{alias}}}}}}|showlink}}</td></tr>|}}
{{#if: {{{flag logo|}}} |<tr><td> * <tt><nowiki>{{flaglogo|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|size=x60px}}</nowiki></tt> → </td><td>{{flaglogo|{{{templatename|{{{alias}}}}}}|size=x60px}}</td></tr>|}}
</table>
</table>
{{#if: {{{redir1|}}} |
{{#if: {{{redir1|}}} |
===Redirect aliases===
===Redirect===
This template can also be used via an ''alias'' name (implemented as a redirect to this template):<!--
This template can also be used via an ''alternative name'' (up to 5 and implemented as a redirect to this template):<!--
--><table class="wikitable"><!--
--><table class="wikitable"><!--
--><tr><th>Alias name</th><th>{{tlx|flag|''alias''}} output</th><th>{{tlx|flagcountry|''alias''}} output</th></tr>
--><tr><th>Alternative  name</th><th>{{t|flag|''alias''}} output</th><th>{{t|flaglink|''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: {{{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>{{flaglink|{{{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: {{{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>{{flaglink|{{{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: {{{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>{{flaglink|{{{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: {{{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>{{flaglink|{{{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> }}<!--
-->{{#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>{{flaglink|{{{redir5}}}}}</td></tr> }}<!--
--></table>
--></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: {{{redir1|}}} |
====Using a redirect alias====
====Using a redirect alias====
* <tt><nowiki>{{flagicon|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{redir1}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{redir1}}}}}
* <tt><nowiki>{{flagcountry|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flagcountry|{{{redir1}}}}}
* <tt><nowiki>{{flaglink|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flaglink|{{{redir1}}}}}
* <tt><nowiki>{{flag|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flag|{{{redir1}}}}}
* <tt><nowiki>{{flag|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></tt> → {{flag|{{{redir1}}}}}
}}
}}
Line 42: Line 53:
===Other information===
===Other information===
{{{{FULLPAGENAME}}/doc}}
{{{{FULLPAGENAME}}/doc}}
}}[[Category:Country data templates|{{{templatename|{{{alias}}}}}}]]
}}


This is the documentation for '''Template:{{PAGENAME}}'''. It is automatically generated by [[Template:Country showdata]].<br/>Please {{purge|purge the cache}} after making any changes to this template.{{#ifexist:{{FULLPAGENAME}}/doc
This is the documentation for '''Template:{{PAGENAME}}'''. It is automatically generated by [[Template:Country showdata]].<br/>Please {{purge|purge the cache}} after making any changes to this template.{{#ifexist:{{FULLPAGENAME}}/doc
  |<br/>This template has a [[{{FULLPAGENAME}}/doc|/doc]] subpage for the purposes of [[WP:CAT|categories]], [[WP:ILL|interlanguage links]] and documentation specific to this template.
  |<br/>This template has a [[{{FULLPAGENAME}}/doc|/doc]] subpage for the purposes of '''categories''' and documentation specific to this template.
  |{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop
  |{{#ifeq:{{PROTECTIONLEVEL:edit}}|sysop
   |<br/>This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] and [[WP:ILL|interlanguage links]] should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Category_interwiki/preload}} /doc] subpage, which is not protected.
   |<br/>This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] and [[WP:ILL|interlanguage links]] should be added to the template's [{{fullurl:{{FULLPAGENAME}}/doc|action=edit&preload=Template:Category_interwiki/preload}} /doc] subpage, which is not protected.
  }}
  }}
}}
}}
}}</includeonly><noinclude>
[[Category:Country data templates|{{{templatename|{{{alias}}}}}}]]
</div>
</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Latest revision as of 14:02, 28 January 2020


[edit] 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.