Difference between revisions of "Template:Fb/doc"

From blackwiki
Jump to navigation Jump to search
imported>PrimeHunter
(→‎Description: add: wrap (optional) - Set to "yes"/"y"/"1" to allow line wrapping of the output. The default is to disallow.)
 
(25 intermediate revisions by 21 users not shown)
Line 1: Line 1:
 
{{documentation subpage}}
 
{{documentation subpage}}
 
==Description==
 
==Description==
<tt><nowiki>{{fb|nation|variant|size=optional|name=optional}}</nowiki></tt>
+
<code><nowiki>{{fb|nation|variant|size=optional|name=optional}}</nowiki></code>
  
 
Produces a flag icon attached to a wikilinked national football team article.
 
Produces a flag icon attached to a wikilinked national football team article.
 
;Parameters
 
;Parameters
*''nation'' Use either the name of the nation or the three-letter country code as used by [[List of FIFA country codes|FIFA]]
+
*''nation''&nbsp;– Use either the name of the nation or the three-letter country code as used by [[List of FIFA country codes|FIFA]]
*''variant'' (optional) Specifies an alternate (historical) flag to use.  This parameter is documented by the appropriate template in [[:Category:Country data templates]].
+
*''variant'' (optional)&nbsp;– Specifies an alternate (historical) flag to use.  This parameter is documented by the appropriate template in [[:Category:Country data templates]].
*''size'' (optional) Can be used to change the flag icon size (use sparingly!)
+
*''size'' (optional)&nbsp;– Can be used to change the flag icon size (use sparingly!)
*''name'' (optional) Can be used to change the wikilink display text
+
*''name'' (optional)&nbsp;– Can be used to change the wikilink display text
 +
*''align'' (optional)&nbsp;– Set to "yes"/"y"/"1" to align country names in vertical lists
 +
*''wrap'' (optional)&nbsp;– Set to "yes"/"y"/"1" to allow line wrapping of the output. The default is to disallow.
  
 
==Examples==
 
==Examples==
*<tt><nowiki>{{fb|Argentina}}</nowiki></tt> → {{fb|Argentina}}
+
*<code><nowiki>{{fb|Argentina}}</nowiki></code> → {{fb|Argentina}}
*<tt><nowiki>{{fb|ENG}}</nowiki></tt> → {{fb|ENG}}
+
*<code><nowiki>{{fb|ENG}}</nowiki></code> → {{fb|ENG}}
*<tt><nowiki>{{fb|Italy|old}}</nowiki></tt> → {{fb|Italy|old}}
+
*<code><nowiki>{{fb|Italy|1861}}</nowiki></code> → {{fb|Italy|1861}}
*<tt><nowiki>{{fb|GER|name=GER}}</nowiki></tt> → {{fb|GER|name=GER}}
+
*<code><nowiki>{{fb|GER|name=GER}}</nowiki></code> → {{fb|GER|name=GER}}
 +
 
 +
==Parameters==
 +
{{TemplateDataHeader}}
 +
 
 +
<templatedata>
 +
{
 +
"params": {
 +
"1": {
 +
"label": "Nation",
 +
"description": "Use either the name of the nation or the three-letter country code as used by FIFA",
 +
"example": "Argentina",
 +
"type": "string",
 +
"required": true
 +
},
 +
"align": {
 +
"label": "Align",
 +
"description": "Set to \"yes\"/\"y\"/\"1\" to align country names in vertical lists",
 +
"type": "unknown"
 +
},
 +
"variant": {
 +
"aliases": [
 +
"2"
 +
],
 +
"label": "Flag variant",
 +
"description": "Specifies an alternate (historical) flag to use. This parameter is documented by the appropriate template in Category:Country data templates.",
 +
"example": "1861",
 +
"type": "string"
 +
},
 +
"size": {
 +
"label": "Icon size",
 +
"description": "Can be used to change the flag icon size (use sparingly!)"
 +
},
 +
"name": {
 +
"label": "Link text",
 +
"description": "Can be used to change the wikilink display text"
 +
}
 +
},
 +
"description": "Produces a flag icon attached to a wikilinked national football team article.",
 +
"paramOrder": [
 +
"1",
 +
"align",
 +
"variant",
 +
"size",
 +
"name"
 +
],
 +
"format": "inline"
 +
}
 +
</templatedata>
  
 
==See also==
 
==See also==
*[[Template:fb-rt]] for rendering the flag on the right
+
*[[Template:fb-rt]]&nbsp;– for rendering the flag on the right
*[[Template:fb-big]] for rendering a larger flag, with the team name underneath the flag
+
*[[Template:fb-big]]&nbsp;– for rendering a larger flag, with the team name underneath the flag
*[[Template:fbu]] for under-''NN'' national teams (i.e. under-20, under-21, etc.)
+
*[[Template:fbicon]]&nbsp;– for rendering the flag on its own, with a wikilink to the national football team page.
*[[Template:fbw]] for women's national teams
+
*[[Template:fbu]]&nbsp;– for under-''NN'' national teams (i.e. under-20, under-21, etc.)
*[[:Category:National football (soccer) teams]]
+
*[[Template:fbw]]&nbsp;– for women's national teams
 +
*[[Template:fbo]]&nbsp;– for national Olympic football teams
 +
*[[:Category:National association football teams]]
 +
 
 +
<includeonly>{{Sandbox other||
 +
[[Category:Association football flag templates]]
 +
[[Category:Flag template system]]
  
<includeonly>
+
}}</includeonly>
[[Category:Football (soccer) templates|{{PAGENAME}}]]
 
[[Category:Flag template system|{{PAGENAME}}]]
 
[[eo:Ŝablono:Fb]]
 
[[id:Templat:fb]]
 
[[ka:თარგი:fb]]
 
[[ms:Templat:Fb]]
 
[[no:Mal:Fotballflagg]]
 
[[ru:Шаблон:Футбол]]
 
</includeonly>
 

Latest revision as of 12:39, 25 December 2020

Description

{{fb|nation|variant|size=optional|name=optional}}

Produces a flag icon attached to a wikilinked national football team article.

Parameters
  • nation – Use either the name of the nation or the three-letter country code as used by FIFA
  • variant (optional) – Specifies an alternate (historical) flag to use. This parameter is documented by the appropriate template in Category:Country data templates.
  • size (optional) – Can be used to change the flag icon size (use sparingly!)
  • name (optional) – Can be used to change the wikilink display text
  • align (optional) – Set to "yes"/"y"/"1" to align country names in vertical lists
  • wrap (optional) – Set to "yes"/"y"/"1" to allow line wrapping of the output. The default is to disallow.

Examples

Parameters

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Fb

Produces a flag icon attached to a wikilinked national football team article.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Nation1

Use either the name of the nation or the three-letter country code as used by FIFA

Example
Argentina
Stringrequired
Alignalign

Set to "yes"/"y"/"1" to align country names in vertical lists

Unknownoptional
Flag variantvariant 2

Specifies an alternate (historical) flag to use. This parameter is documented by the appropriate template in Category:Country data templates.

Example
1861
Stringoptional
Icon sizesize

Can be used to change the flag icon size (use sparingly!)

Unknownoptional
Link textname

Can be used to change the wikilink display text

Unknownoptional

See also