Predloga:Prikažipodatke države: Razlika med redakcijama

Iz Wikipedije, proste enciklopedije
Izbrisana vsebina Dodana vsebina
m pp
mBrez povzetka urejanja
Vrstica 119: Vrstica 119:
{{#if: {{{flag alias-naval|}}} |
{{#if: {{{flag alias-naval|}}} |
redloga vsebuje tudi [[pomorska zastava|pomorsko]] različico zastave, ki se lahko uporabi v kombinaciji s predlogo [[Predloga:Mornarica|Mornarica]]:
redloga vsebuje tudi [[pomorska zastava|pomorsko]] različico zastave, ki se lahko uporabi v kombinaciji s predlogo [[Predloga:Mornarica|Mornarica]]:
* <code><nowiki>{{mornarica|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{mornarica|{{{redir1}}}|naval}}
* <code><nowiki>{{mornarica|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{mornarica|{{{templatename|{{{alias}}}}}}|naval}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|naval}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|naval}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|naval}}
| {{#if: {{{link alias-naval|}}} |
| {{#if: {{{link alias-naval|}}} |
This nation's naval ensign is the same as its national flag, so [[Predloga:mornarica]] produces the following:
This nation's naval ensign is the same as its national flag, so [[Predloga:mornarica]] produces the following:
* <code><nowiki>{{mornarica|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{mornarica|{{{redir1}}}}}
* <code><nowiki>{{mornarica|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{mornarica|{{{templatename|{{{alias}}}}}}}}
}}}}<!--
}}}}<!--
-->{{#if: {{{flag alias-air force|}}} |{{break}}
-->{{#if: {{{flag alias-air force|}}} |{{break}}
This template includes an air force ensign flag variant that can be used with [[Predloga:Air force]]:
This template includes an air force ensign flag variant that can be used with [[Predloga:Air force]]:
* <code><nowiki>{{air force|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{air force|{{{redir1}}}}}
* <code><nowiki>{{air force|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{air force|{{{templatename|{{{alias}}}}}}}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|air force}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|air force}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|air force}}</nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|air force}}
| {{#if: {{{link alias-air force|}}} |{{break}}
| {{#if: {{{link alias-air force|}}} |{{break}}
This nation's air force ensign is the same as its national flag, so [[Predloga:Air force]] produces the following:
This nation's air force ensign is the same as its national flag, so [[Predloga:Air force]] produces the following:
* <code><nowiki>{{air force|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{air force|{{{redir1}}}}}
* <code><nowiki>{{air force|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{air force|{{{templatename|{{{alias}}}}}}}}
}}}}<!--
}}}}<!--
-->{{#if: {{{flag alias-space force|}}} |{{break}}
-->{{#if: {{{flag alias-space force|}}} |{{break}}
This template includes a space force ensign flag variant that can be used with [[Predloga:Space force]]:
This template includes a space force ensign flag variant that can be used with [[Predloga:Space force]]:
* <code><nowiki>{{space force|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{space force|{{{redir1}}}}}
* <code><nowiki>{{space force|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{space force|{{{templatename|{{{alias}}}}}}}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|space force}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|space force}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|space force}}</nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|space force}}
| {{#if: {{{link alias-space force|}}} |{{break}}
| {{#if: {{{link alias-space force|}}} |{{break}}
This nation's space force flag is the same as its national flag, so [[Predloga:Space force]] produces the following:
This nation's space force flag is the same as its national flag, so [[Predloga:Space force]] produces the following:
* <code><nowiki>{{space force|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{space force|{{{redir1}}}}}
* <code><nowiki>{{space force|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{space force|{{{templatename|{{{alias}}}}}}}}
}}}}<!--
}}}}<!--
-->{{#if: {{{flag alias-marines|}}} |{{break}}
-->{{#if: {{{flag alias-marines|}}} |{{break}}
This template includes a marine ensign flag variant that can be used with [[Predloga:Marines]]:
This template includes a marine ensign flag variant that can be used with [[Predloga:Marines]]:
* <code><nowiki>{{marines|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{marines|{{{redir1}}}}}
* <code><nowiki>{{marines|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{marines|{{{templatename|{{{alias}}}}}}}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|marines}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|marines}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|marines}}</nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|marines}}
| {{#if: {{{link alias-marines|}}} |{{break}}
| {{#if: {{{link alias-marines|}}} |{{break}}
This nation's marine ensign is the same as its national flag, so [[Predloga:Marines]] produces the following:
This nation's marine ensign is the same as its national flag, so [[Predloga:Marines]] produces the following:
* <code><nowiki>{{marines|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{marines|{{{redir1}}}}}
* <code><nowiki>{{marines|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{marines|{{{templatename|{{{alias}}}}}}}}
}}}}<!--
}}}}<!--
-->{{#if: {{{flag alias-military|}}} |{{break}}
-->{{#if: {{{flag alias-military|}}} |{{break}}
This template includes a marine ensign flag variant that can be used with [[Predloga:Armed forces]]:
This template includes a marine ensign flag variant that can be used with [[Predloga:Armed forces]]:
* <code><nowiki>{{Armed forces|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{Armed forces|{{{redir1}}}}}
* <code><nowiki>{{Armed forces|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{Armed forces|{{{templatename|{{{alias}}}}}}}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|military}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|military}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|military}}</nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|military}}
| {{#if: {{{link alias-military|}}} |{{break}}
| {{#if: {{{link alias-military|}}} |{{break}}
This nation's military ensign is the same as its national flag, so [[Predloga: Armed forces]] produces the following:
This nation's military ensign is the same as its national flag, so [[Predloga: Armed forces]] produces the following:
* <code><nowiki>{{Armed forces|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{Armed forces|{{{redir1}}}}}
* <code><nowiki>{{Armed forces|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{Armed forces|{{{templatename|{{{alias}}}}}}}}
}}}}<!--
}}}}<!--
-->{{#if: {{{flag alias-navy|}}} |{{break}}
-->{{#if: {{{flag alias-navy|}}} |{{break}}
This template includes a navy flag variant that can be used with [[Predloga:Navy]]:
This template includes a navy flag variant that can be used with [[Predloga:Navy]]:
* <code><nowiki>{{navy|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{navy|{{{redir1}}}|navy}}
* <code><nowiki>{{navy|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{navy|{{{templatename|{{{alias}}}}}}|navy}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|navy}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|navy}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|navy}}</nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|navy}}
| {{#if: {{{link alias-navy|}}} |{{break}}
| {{#if: {{{link alias-navy|}}} |{{break}}
This nation's navy flag is the same as its national flag, so [[Predloga:Navy]] produces the following:
This nation's navy flag is the same as its national flag, so [[Predloga:Navy]] produces the following:
* <code><nowiki>{{navy|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{navy|{{{redir1}}}}}
* <code><nowiki>{{navy|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{navy|{{{templatename|{{{alias}}}}}}}}
}}}}<!--
}}}}<!--
-->{{#if: {{{flag alias-coast guard|}}} |{{break}}
-->{{#if: {{{flag alias-coast guard|}}} |{{break}}
This template includes a coast guard ensign flag variant that can be used with [[Predloga:Coast guard]]:
This template includes a coast guard ensign flag variant that can be used with [[Predloga:Coast guard]]:
* <code><nowiki>{{coast guard|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{coast guard|{{{redir1}}}}}
* <code><nowiki>{{coast guard|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{coast guard|{{{templatename|{{{alias}}}}}}}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|coast guard}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|coast guard}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|coast guard}}</nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|coast guard}}
| {{#if: {{{link alias-coast guard|}}} |{{break}}
| {{#if: {{{link alias-coast guard|}}} |{{break}}
This nation's coast guard ensign is the same as its national flag, so [[Predloga:Coast guard]] produces the following:
This nation's coast guard ensign is the same as its national flag, so [[Predloga:Coast guard]] produces the following:
* <code><nowiki>{{coast guard|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{coast guard|{{{redir1}}}}}
* <code><nowiki>{{coast guard|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{coast guard|{{{templatename|{{{alias}}}}}}}}
}}}}<!--
}}}}<!--
-->{{#if: {{{flag alias-army|}}} |{{break}}
-->{{#if: {{{flag alias-army|}}} |{{break}}
This template includes an army ensign flag variant that can be used with [[Predloga:Army]]:
This template includes an army ensign flag variant that can be used with [[Predloga:Army]]:
* <code><nowiki>{{army|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{army|{{{redir1}}}}}
* <code><nowiki>{{army|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{army|{{{templatename|{{{alias}}}}}}}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{redir1}}}<nowiki>|army}}</nowiki></code> → {{ikonazastave|{{{redir1}}}|army}}
* <code><nowiki>{{ikonazastave|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>|army}}</nowiki></code> → {{ikonazastave|{{{templatename|{{{alias}}}}}}|army}}
| {{#if: {{{link alias-army|}}} |{{break}}
| {{#if: {{{link alias-army|}}} |{{break}}
This nation's army ensign is the same as its national flag, so [[Predloga:Army]] produces the following:
This nation's army ensign is the same as its national flag, so [[Predloga:Army]] produces the following:
* <code><nowiki>{{army|</nowiki>{{{redir1}}}<nowiki>}}</nowiki></code> → {{army|{{{redir1}}}}}
* <code><nowiki>{{army|</nowiki>{{{templatename|{{{alias}}}}}}<nowiki>}}</nowiki></code> → {{army|{{{templatename|{{{alias}}}}}}}}
}}}} }}
}}}} }}
{{#if: {{{related1|}}} |
{{#if: {{{related1|}}} |

Redakcija: 00:30, 30. november 2021

Dokumentacija za predlogo[poglej] [uredi] [zgodovina] [osveži]

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 Kategorija:Predloge Podatki države.

Usage

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

{{ {{{1<noinclude>|prikažipodatke države</noinclude>}}}
| alias = Countryname
| shortname alias = Shortcountryname  <!-- only necessary if Shortcountryname ≠ Countryname, otherwise omit -->
| flag alias = Flag of Countryname.svg
| size = {{{size|}}}
| name = {{{name|}}}
| variant = {{{variant|}}}  <!-- only necessary if there is one or more flag alias-variant parameters, otherwise omit -->
}}

The first parameter to a country data template is usually the name of a formatting meta-template. For example, Predloga:Zastava uses Predloga:Zastava/core 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>|prikažipodatke države</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) if present, and can document unique optional parameters (such as flag variants) if instructed to. This latter method uses 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, Predloga:Podatki države Sejšeli 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 forty flag variants can be documented by this method (using var1 to var40). If more are present, 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 labels naval, air force and army (used for the country's naval, air force and army ensigns, respectively). If present, they 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 specified 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, Predloga:Podatki države DEU and Predloga:Podatki države GER both redirect to Predloga:Podatki države Nemčija, because DEU is the ISO code and GER is the IOC and FIFA code for Germany. Therefore, {{flagicon|DEU}}, {{flagicon|GER}}, and {{flagicon|Nemčija}} all have the same result. These redirect aliases are documented by the following template code fragment:

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

Up to five flag redirects can be documented by this method (using redir1 to redir5).

Related templates

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

For example, Predloga:Podatki države Srbija in Črna gora includes the following code to document three other related country data templates:

<noinclude>
...
| related1 = Serbija
| related2 = Črna gora
| related3 = FR Yugoslavia
...
</noinclude>

Up to six related flags can be documented by this method (using related1 to related6).

Flag article link

This template shows a large flag image on the right of the documentation box, with a link to an article about the flag in the caption if it exists. The page that it evaluates is "Flag of {{{alias}}}", with the value of |alias= in the template code replacing {{{alias}}}. If there is an article about the flag even though "Flag of {{{alias}}}" does not exist, either create the latter as a redirect to the correct page or add the following parameter:

<noinclude>
...
| flag link = ''Article name''
...
</noinclude>

This can also be used to override the automatic link if "Flag of {{{alias}}}" does exist but leads to the wrong article.

Additional documentation

For situations where the automatic documentation method is not completely adequate, additional documentation can be displayed by prikažipodatke države. Simply create a documentation subpage (named as Predloga:Podatki države Countryname/doc) with the additional material, and it will be transcluded after all other output sections.

For example:

Categorization

This template automatically categorizes pages it is transcluded on in Kategorija:Vse Predloge Podatki države and in the tracking categories in Kategorija:Sledilne kategorije Podatki države. Content categories, such as those by country or by type/status, should be added manually by putting them inside <includeonly>...</includeonly> tags on a template's documentation subpage. If a template does not have a documentation page yet, click on the "/doc" link at the bottom of the automatic documentation, add categories between the preloaded <includeonly> tags and save the page.

The default sort key used for the automatic categories is the part after Predloga:Podatki države in the page title. The parameter |cat= can be used to specify a custom ASCII sorting key for these categories. For example, Predloga:Podatki države Åland Islands and Predloga:Podatki države Republic of Ireland use this parameter to sort them under "A" and "I" respectively.

Automatically added by this template:

Manually added to templates or documentation pages: