Template:Flagof
Script error: No such module "Flagg".
Uses Lua: |
This template is similar to {{Flag }}, with the main difference that it links to the article on the flag rather than the article on the country. The default link is to "Flag of {{{alias}}}
", where |alias=
is the country article name passed by the country's data template.
Parameters
Basic parameters
|1=
(first unnamed parameter): Name of country or any other entity. If "Template:Country data ..." exists for that entity, data from that template is used for the link and image.
Image parameters
|variant=
(or second unnamed parameter): Identifies a variant flag image, such as an ensign or a historical flag (for a list of available variants for each entity, see their respective country data templates)|size=
: Size of the icon. The default size is 32x21px, which is slightly larger than the default size of {{Flag }}, {{Flag icon }} etc.|image=
: Custom image name without "File:" prefix. If not specified uses an image from the entity's country data template.|border=
: Set to nothing to remove the border from a custom image if it's a non-rectangular flag. The border should be automatically deactivated for images from country data templates if necessary (if it isn't the line "|border=
" should be added to the data template).
Name and link parameters
|name=
: Display name (doesn't affect linked article name). Defaults to the value of the first unnamed parameter.|prefix=
: Set to "yes" to display the "Flag of" prefix.|link=
: The article to link to. Defaults to "Flag of|alias=
", using the value of|alias=
from the country data template. Set to nothing to omit the link entirely and produce only the flag icon. The link is automatically omitted by default if no first parameter is specified (see last three examples).|section=
: Links to a section of the linked article|the=
: Set to "yes" to add the definite article "the" between "Flag of" and the entity name in the link.|list=
: Set to "yes" if the template is used in a vertical list; this ensures the country names are lined up correctly.
Examples
{{flagof|Germany}}
→ Script error: No such module "Flagg".{{flagof|Georgia}}
→ Script error: No such module "Flagg". (automatically links to Flag of Georgia (country) because the country article is at Georgia (country)){{flagof|Ohio}}
→ Script error: No such module "Flagg". (automatically removes the border){{flagof|Australia|size=23x15px}}
→ Script error: No such module "Flagg". (default size for other flag templates){{flagof|Canada|variant=1921}}
→ Script error: No such module "Flagg". (historical flag)- Alternatively:
{{flagof|Canada|1921}}
→ Script error: No such module "Flagg". (shorter)
- Alternatively:
Customized name and link
{{flagof|Scotland|name=Saint Andrew's Saltire}}
→ Script error: No such module "Flagg". (custom display name){{flagof|Scotland|prefix=yes}}
→ Script error: No such module "Flagg". (displayed prefix){{flagof|United Kingdom|the=yes}}
→ Script error: No such module "Flagg". (definite article in link){{flagof|United Kingdom|variant=naval|link=White Ensign}}
→ Script error: No such module "Flagg". (custom linked article){{flagof|Belarus|variant=1991|section=White-red-white flag}}
→ Script error: No such module "Flagg". (links to the section of Flag of Belarus about the shown flag){{flagof|India|variant=British|link=List of Indian flags|section=British India}}
→ Script error: No such module "Flagg". (links to a section of a custom linked article)- Alternatively:
{{flagof|India|variant=British|link=List of Indian flags#British India}}
→ Script error: No such module "Flagg". (more intuitive)
- Alternatively:
{{flagof|Japan|link=}}
→ Script error: No such module "Flagg". (flag icon only; no link)
Customized image
{{flagof|Spain|image=Flag of Spain (civil).svg}}
→ Script error: No such module "Flagg". (custom image for entity with country data template; consider adding the image to the template as a variant if a template exists){{flagof|Belfast|image=Flag of Belfast.svg}}
→ Script error: No such module "Flagg". (entity without country data template; uses the first parameter as alias for the link){{flagof|Denmark|image=Flag of Denmark (state).svg|border=}}
→ Script error: No such module "Flagg". (custom image without border){{flagof|image=Flag of Gozo.svg}}
→ Script error: No such module "Flagg". (no link if there is an image but no first parameter)
Empty image
{{flagof}}
→ Script error: No such module "Flagg". (no parameters at all; uses the empty placeholder flag image from Template:Country data without link){{flagof|link=Flags of Antarctica|name=Antarctica}}
→ Script error: No such module "Flagg". (empty image with link; {{Noflag }}-like)- Alternatively:
{{flagof|Antarctica|image=}}
→ Script error: No such module "Flagg".
- Alternatively: