Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Flagicon: Difference between revisions

Template page
(Copied messy code from Wikipedia for flag icons)
 
m (No longer required to put "File:" to display flag icons)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{safesubst<noinclude />:#ifeq: {{Yesno-no|{{{noredlink|}}}}}|yes<noinclude><!--
<includeonly>[[File:{{{1}}}|23px]]</includeonly><noinclude>
  --></noinclude>|<noinclude><!--
Usage:
          #Check for existence of Template: Country data foo before invoking it
<nowiki>{{Flagicon|Flag of Brazil.svg}}</nowiki>
      --></noinclude>{{safesubst<noinclude />:#ifexist: Template: Country data {{{1|}}}<noinclude><!--
Produces:
        --></noinclude>|<noinclude><!--
 
              # It exists, so proceed
{{Flagicon|Flag of Brazil.svg}}<templatedata>
          --></noinclude>{{country data {{{1|}}}|flagicon/core|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<noinclude><!--
{
        --></noinclude>|<noinclude><!--
"params": {
              # It doesn't exist, so do nothing
"1": {
      --></noinclude>}}<noinclude><!--
"label": "Image file",
  --></noinclude>|<noinclude><!--
"type": "wiki-file-name",
          # DEFAULT call  Template: Country data {{{1|}}}
"required": true
          # with no prior checks
}
    --></noinclude>{{country data {{{1|}}}|flagicon/core|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}}}<noinclude><!--
},
          # Track use where "Template:Country data Foo" does not exist
"description": "Creates a flag icon"
    --></noinclude>{{safesubst<noinclude />:#ifexist: Template:Country data {{{1|}}}||{{safesubst<noinclude />:namespace detect showall
}
| 1 =
</templatedata></noinclude>
| 2 = [[Category:Flagicons with missing country data templates]]
| user  = 1
| talk  = 1
| other = 2
}}}}<noinclude><!--
--></noinclude>}}</includeonly>{{safesubst<noinclude />:#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using flagicon template with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Flagicon]] with unknown parameter "_VALUE_"|ignoreblank=y| 1 | 2 | noredlink | size | variant }}<noinclude>
{{Documentation}}
</noinclude>

Latest revision as of 03:17, 31 March 2022

Usage:

{{Flagicon|Flag of Brazil.svg}}

Produces:

Creates a flag icon

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Image file1

no description

Filerequired