From Hattrick
Revision as of 08:16, 4 May 2010 by Jhattara (talk | contribs) (Created page with '{{country data {{{1|}}}|country flagicon2|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<noinclude>{{documentation}}</noinclude>')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

[edit] Template documentation


Displays a flag of the named parameter in "icon" size, currently 20x12 pixels plus a one pixel border. The image also has an alt attribute (usually "Flag of name"), which is displayed by Internet Explorer when hovering over the flag image, or interpreted by screen reader software and browsers with images disabled.



The first parameter is mandatory, and identifies the name of the country, region, city, etc. A full list of available parameters can be found in Category:Country data templates. For example, Template:Country data Polska is used when the name parameter is specified as Polska.
This parameter is optional, and is used to specify the maximum width and/or height of the flag image. This parameter is specified using standard image syntax.
This parameter is optional, and is used to link the flag into an article.


Wikicode Results Notes
{{flagicon|Polska}} Poland
{{flagicon|Poland}} Poland
{{flagicon|POL}} Poland Uses the FIFA country code
{{flagicon|Polska|link=Polska}} Poland Link to article
{{flagicon|Polska|size=50px}} Poland Sets width to 50 pixels
{{flagicon|POL|size=999x30px}} Poland Sets height to 20 pixels

Implementation notes

This template uses the data templates listed under Category:Country data templates, which contain the data what to display and the formatter Template:Country flagicon2, which contains the logic how to display the flag.

Related templates

  • Template:flag is used to display a wikilinked name next to the flag. The displayed name will be the same as the parameter used with the template, but the link target will be the main article for the country (in these examples, Poland).