Difference between revisions of "Template:Flaglink/doc"
Jump to navigation
Jump to search
imported>SiBr4 m (<tt> → <code>) |
imported>SiBr4 m (→Description: Using flagdeco in equivalent code (flagicon has a link)) |
||
| Line 5: | Line 5: | ||
Produces a flag icon attached to a wikilinked article. The name of the country is the prefix of the wikilink, but the display text is just the name of the country by itself. | Produces a flag icon attached to a wikilinked article. The name of the country is the prefix of the wikilink, but the display text is just the name of the country by itself. | ||
| − | For example, <code><nowiki>{{flaglink|Brazil|at the 2007 Pan American Games}}</nowiki></code> has the same effect as <code><nowiki>{{ | + | For example, <code><nowiki>{{flaglink|Brazil|at the 2007 Pan American Games}}</nowiki></code> has the same effect as <code><nowiki>{{flagdeco|Brazil}} [[Brazil at the 2007 Pan American Games|Brazil]]</nowiki></code>, both producing: {{flaglink|Brazil|at the 2007 Pan American Games}}. |
;Parameters | ;Parameters | ||
Revision as of 20:14, 30 August 2015
| This is a documentation subpage for Template:Flaglink. It contains usage information, categories and other content that is not part of the original template page. |
Description
{{flaglink|country|link|variant=optional|size=optional|name=optional}}
Produces a flag icon attached to a wikilinked article. The name of the country is the prefix of the wikilink, but the display text is just the name of the country by itself.
For example, {{flaglink|Brazil|at the 2007 Pan American Games}} has the same effect as {{flagdeco|Brazil}} [[Brazil at the 2007 Pan American Games|Brazil]], both producing:
Brazil.
- Parameters
- nation — Use the name of the country/region as per the set of templates in Category:Country data templates or an "alias" (such as a three-letter country code) as per the set of templates in Category:Country data redirects
- link — Specifies the suffix to append to the country's name to form the wikilink
- variant (optional) — Specifies an alternate (historical) flag to use. This parameter is documented by the appropriate country data template. This label can be specified as a named parameter, or as the third positional parameter.
- size (optional) — Can be used to change the flag icon size (use sparingly!)
- name (optional) — Can be used to change the wikilink display text
Examples
{{flaglink|Netherlands|in the Eurovision Song Contest}}→
Netherlands{{flaglink|ENG|at the 2006 Commonwealth Games}}→
England{{flaglink|Canada|at the 1930 British Empire Games|1921}}→
Canada{{flaglink|Canada|variant=1921|at the 1930 British Empire Games}}→
Canada
See also