Template:Flaglink/doc: Difference between revisions

From Hattrick
Jump to navigationJump to search
Jhattara (talk | contribs)
No edit summary
Jhattara (talk | contribs)
No edit summary
Line 1: Line 1:
{{documentation subpage}}
This template displays the flag and the name of a country, linked to the main article of that country (flag + country).
This template displays the flag and the name of a country, linked to the main article of that country (flag + country).


Line 38: Line 37:
[[Category:Flag template system|{{PAGENAME}}]]
[[Category:Flag template system|{{PAGENAME}}]]
</includeonly>
</includeonly>
<noinclude>[[Category:Template documentation]]</noinclude>

Revision as of 07:08, 4 May 2010

This template displays the flag and the name of a country, linked to the main article of that country (flag + country).

Usage

Country (mandatory)
Parameter 1 identifies the country by name or three-letter code (ISO 3166-1 alpha-3)
Name example: {{flagcountry|France}} → Template:Flagcountry
Country code example: {{flagcountry|FRA}} → Template:Flagcountry
Variant flag image (optional)
Parameter 2 is used to display a different version of the flag.
Example: {{flagcountry|France|free}} → Template:Flagcountry. In this example, the historical flag for Free France (1940-1945) is identified by the second parameter of "free". The list of flag variants is specific for each country.
Link text (optional)
Use the name= parameter to change the link text.
Example: {{flagcountry|France|name=C'est la France}} → Template:Flagcountry
Size (optional)
Use the size= parameter to change the size from the default.
Example: {{flagcountry|France|size=40px}} → Template:Flagcountry.

Implementation

This template uses the data templates listed under category:country data templates, which contain the data what to display (Example: template:country data France) and the formatter template:country flagcountry2, which contains the logic how to display the country data.

Related templates