Template:Country showdata: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>SiBr4
Automatically removing border for variant flag image to match template output
meta>SiBr4
Extracting template name from the page title so the {{{templatename}}} parameter is no longer necessary (but keeping the parameter for now)
Line 54: Line 54:
{{#if: {{{flag alias-naval|}}} |
{{#if: {{{flag alias-naval|}}} |
This template includes a naval ensign flag variant that can be used with [[Template:Navy]]:
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>{{navy|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>}}</nowiki></tt> → {{navy|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|naval}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|naval}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>|naval}}</nowiki></tt> → {{flagicon|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}|naval}}
| {{#if: {{{link alias-naval|}}} |
| {{#if: {{{link alias-naval|}}} |
This nation's naval ensign is the same as its national flag, so [[Template:Navy]] produces the following:
This nation's naval ensign is the same as its national flag, so [[Template:Navy]] produces the following:
* <tt><nowiki>{{navy|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{navy|{{{templatename|{{{alias}}}}}}}}
* <tt><nowiki>{{navy|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>}}</nowiki></tt> → {{navy|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}
}}}}
}}}}
{{#if: {{{flag alias-air force|}}} |
{{#if: {{{flag alias-air force|}}} |
This template includes an air force ensign flag variant that can be used with [[Template: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>{{air force|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>}}</nowiki></tt> → {{air force|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|air force}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|air force}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>|air force}}</nowiki></tt> → {{flagicon|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}|air force}}
}}
}}
{{#if: {{{flag alias-army|}}} |
{{#if: {{{flag alias-army|}}} |
This template includes an army ensign flag variant that can be used with [[Template: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>{{army|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>}}</nowiki></tt> → {{army|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|army}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|army}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>|army}}</nowiki></tt> → {{flagicon|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}|army}}
}} }}
}} }}
{{#if: {{{redir1|}}} |
{{#if: {{{redir1|}}} |
Line 83: Line 83:
}}
}}
===Example usage===
===Example usage===
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{{alias}}}}}}}}
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}}}<!--
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}<!--
-->{{#if: {{{shortname alias|}}} |
-->{{#if: {{{shortname alias|}}} |
* <tt><nowiki>{{flagcountry|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></tt> → {{flagcountry|{{{templatename|{{{alias}}}}}}}} }}
* <tt><nowiki>{{flagcountry|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>}}</nowiki></tt> → {{flagcountry|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}} }}
{{#if: {{{var1|}}} |
{{#if: {{{var1|}}} |
====Using a flag variant====
====Using a flag variant====
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{{alias}}}}}}|{{{var1}}}}}
* <tt><nowiki>{{flag|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flag|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}|{{{var1}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{templatename|{{{alias}}}}}}|{{{var1}}}}}
* <tt><nowiki>{{flagicon|</nowiki>{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}<nowiki>|</nowiki>{{{var1}}}<nowiki>}}</nowiki></tt> → {{flagicon|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}|{{{var1}}}}}
}}
}}
{{#if: {{{redir1|}}} |
{{#if: {{{redir1|}}} |
Line 118: Line 118:
}}
}}
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--
   -->[[Category:All country data templates|{{{cat|{{{templatename|{{{alias}}}}}}}}}]]<!--
   -->[[Category:All country data templates|{{{cat|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}}]]<!--
   -->{{#if:{{{shortname alias|}}}|<!--
   -->{{#if:{{{shortname alias|}}}|<!--
     -->[[Category:Country data templates with distinct shortname|{{{cat|{{{templatename|{{{alias}}}}}}}}}]]<!--
     -->[[Category:Country data templates with distinct shortname|{{{cat|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}}]]<!--
   -->}}<!--
   -->}}<!--
   -->{{#ifeq:{{PAGENAME}}|Country data {{{alias}}}||<!--
   -->{{#ifeq:{{PAGENAME}}|Country data {{{alias}}}||<!--
     -->{{#ifeq:{{PAGENAME}}|Country data {{{shortname alias}}}||<!--
     -->{{#ifeq:{{PAGENAME}}|Country data {{{shortname alias}}}||<!--
       -->[[Category:Country data templates with distinct template name|{{{cat|{{{templatename|{{{alias}}}}}}}}}]]<!--
       -->[[Category:Country data templates with distinct template name|{{{cat|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}}]]<!--
     -->}}<!--
     -->}}<!--
   -->}}<!--
   -->}}<!--
-->{{#ifexist:{{FULLPAGENAME}}/doc|<!--
-->{{#ifexist:{{FULLPAGENAME}}/doc|<!--
     -->[[Category:Country data templates with documentation subpage|{{{cat|{{{templatename|{{{alias}}}}}}}}}]]|<!--
     -->[[Category:Country data templates with documentation subpage|{{{cat|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}}]]|<!--
     -->[[Category:Country data templates|{{{cat|{{{templatename|{{{alias}}}}}}}}}]]<!--
     -->[[Category:Country data templates|{{{cat|{{{templatename|{{Str right|{{BASEPAGENAME}}|13}}}}}}}}]]<!--
   -->}}<!--
   -->}}<!--
-->}}
-->}}

Revision as of 22:06, 16 May 2014