Jump to content

Template:Flag image/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m change source to syntaxhighlight
Tag: Reverted
Line 3: Line 3:
== Usage ==
== Usage ==
This template generates a floating flag image. Use the parameter {{para|Image}} to specify an image without "File:"/"Image:" prefix, {{para|Pos}} to control the position of the image (left, right, none or center; default right), {{para|Image_size}} to control the image size (default 210×105px), {{para|Width}} to specify image width (integer only, without any unit or suffix), {{para|Box_width}} to specify the width of the box (integer only, without any unit or suffix), {{para|Caption}} to specify the text underneath the image, and {{para|NoCentering}} to make the text not centered underneath the image. The parameter {{para|Country}} may be used to use the image specified by Template:Country data {{{Country}}} (overridden by the {{para|Image}} parameter if specified) and to generate a default caption "Flag of {{{Country}}}". Parameter names are fully case-sensitive.
This template generates a floating flag image. Use the parameter {{para|Image}} to specify an image without "File:"/"Image:" prefix, {{para|Pos}} to control the position of the image (left, right, none or center; default right), {{para|Image_size}} to control the image size (default 210×105px), {{para|Width}} to specify image width (integer only, without any unit or suffix), {{para|Box_width}} to specify the width of the box (integer only, without any unit or suffix), {{para|Caption}} to specify the text underneath the image, and {{para|NoCentering}} to make the text not centered underneath the image. The parameter {{para|Country}} may be used to use the image specified by Template:Country data {{{Country}}} (overridden by the {{para|Image}} parameter if specified) and to generate a default caption "Flag of {{{Country}}}". Parameter names are fully case-sensitive.

==Examples==
Code:
<syntaxhighlight lang="text">
{|
|{{Flag image|Country=Denmark}}
|{{Flag image|Image=Flag of Germany.svg|Caption=Flag of Germany}}
|{{Flag image|Country=Nepal|NoBorder=yes}}
|{{Flag image|Country=Russia|Image_size=120px}}
|}
</syntaxhighlight>

Output:
{|
|{{Flag image|Country=Denmark}}
|{{Flag image|Image=Flag of Germany.svg|Caption=Flag of Germany}}
|{{Flag image|Country=Nepal|NoBorder=yes}}
|{{Flag image|Country=Russia|Image_size=120px}}
|}

<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Flag templates]]
}}</includeonly>

Revision as of 02:19, 9 February 2021

Usage

This template generates a floating flag image. Use the parameter |Image= to specify an image without "File:"/"Image:" prefix, |Pos= to control the position of the image (left, right, none or center; default right), |Image_size= to control the image size (default 210×105px), |Width= to specify image width (integer only, without any unit or suffix), |Box_width= to specify the width of the box (integer only, without any unit or suffix), |Caption= to specify the text underneath the image, and |NoCentering= to make the text not centered underneath the image. The parameter |Country= may be used to use the image specified by Template:Country data {{{Country}}} (overridden by the |Image= parameter if specified) and to generate a default caption "Flag of {{{Country}}}". Parameter names are fully case-sensitive.