Template:Flaglink/doc: Difference between revisions
From Hattrick
Jump to navigationJump to search
m moved Template:Flagcountry/doc to Template:Flaglink/doc |
No edit summary |
||
| Line 1: | Line 1: | ||
This template displays the flag | This template displays the flag, linked to the main article of that country. | ||
=== Usage === | === Usage === | ||
; Country (mandatory) | ; Country (mandatory) | ||
: Parameter 1 identifies the country by '''name''' or '''three-letter code''' | : Parameter 1 identifies the country by '''name''' or '''three-letter code''' | ||
: Name example: <nowiki>{{flagcountry|</nowiki>'''France'''}} → {{flagcountry|France}} | : Name example: <nowiki>{{flagcountry|</nowiki>'''France'''}} → {{flagcountry|France}} | ||
: Country code example: <nowiki>{{flagcountry|</nowiki>'''FRA'''}} → {{flagcountry|FRA}} | : Country code example: <nowiki>{{flagcountry|</nowiki>'''FRA'''}} → {{flagcountry|FRA}} | ||
; Size (optional) | ; Size (optional) | ||
: Use the '''size=''' parameter to change the size from the default. | : Use the '''size=''' parameter to change the size from the default. | ||
: Example: <nowiki>{{ | : Example: <nowiki>{{flaglink|France|</nowiki>'''size=40px'''}} → {{flagcountry|France|size=40px}}. | ||
===Implementation=== | ===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. | 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. | ||
* <nowiki>{{ | * <nowiki>{{flaglink|France}}</nowiki> = {{flaglink|France}} — uses [[template:country data France]] | ||
* <nowiki>{{ | * <nowiki>{{flaglink|FRA}}</nowiki> = {{flaglink|FRA}} — uses [[template:country data FRA]], which is a redirect to [[template:country data France]] | ||
=== Related templates === | === Related templates === | ||
* [[template:flagicon]] — to | * [[template:flagicon]] — similar to [[template:flaglink|flaglink]], but links either nowhere or to another page | ||
** <nowiki>{{flagicon|France}}</nowiki> = {{flagicon|France}} | ** <nowiki>{{flagicon|France}}</nowiki> = {{flagicon|France}} | ||
** <nowiki>{{flagicon|FRA}}</nowiki> = {{flagicon|FRA}} | ** <nowiki>{{flagicon|FRA}}</nowiki> = {{flagicon|FRA}} | ||
* [[template:flag]] — | * [[template:flag]] — to display the flag with the name of the country | ||
** <nowiki>{{flag|France}}</nowiki> = {{flag|France}} | ** <nowiki>{{flag|France}}</nowiki> = {{flag|France}} | ||
** <nowiki>{{flag|FRA}}</nowiki> = {{flag|FRA}} | ** <nowiki>{{flag|FRA}}</nowiki> = {{flag|FRA}} | ||
Revision as of 17:03, 5 May 2010
This template displays the flag, linked to the main article of that country.
Usage
- Country (mandatory)
- Parameter 1 identifies the country by name or three-letter code
- Name example: {{flagcountry|France}} → Template:Flagcountry
- Country code example: {{flagcountry|FRA}} → Template:Flagcountry
- Size (optional)
- Use the size= parameter to change the size from the default.
- Example: {{flaglink|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.
- {{flaglink|France}} =
— uses template:country data France - {{flaglink|FRA}} =
— uses template:country data FRA, which is a redirect to template:country data France
Related templates
- template:flagicon — similar to flaglink, but links either nowhere or to another page
- {{flagicon|France}} =

- {{flagicon|FRA}} =

- {{flagicon|France}} =
- template:flag — to display the flag with the name of the country