Difference between revisions of "Template:Flagright"

From NSWiki
Jump to: navigation, search
(Created page with "{{country data {{{1}}}|flagright/flag|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}|name={{{name|{{{1|}}}}}}}}<noinclude> {{documentation subpage}} This template works like...")
 
(Replaced content with "{{country data {{{1}}}|flagright/flag|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}|name={{{name|{{{1|}}}}}}}}<noinclude> {{documentation}} </noinclude>")
Line 1: Line 1:
 
{{country data {{{1}}}|flagright/flag|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}|name={{{name|{{{1|}}}}}}}}<noinclude>
 
{{country data {{{1}}}|flagright/flag|variant={{{variant|{{{2|}}}}}}|size={{{size|}}}|name={{{name|{{{1|}}}}}}}}<noinclude>
{{documentation subpage}}
+
{{documentation}}
 
+
This template works like the {{tl|flag}} template, but displays the flag to the right of the country name.
+
 
+
The template can display every country/territory with a [[:Category:Country data templates|"Country data ..." template]], and abbreviations are also possible:
+
 
+
{| class="wikitable"
+
! style="text-align: center;" | Wikicode
+
! style="text-align: center;" | Result
+
! width="500" | Notes
+
|-
+
| <nowiki>{{flagright|Kelssek}}</nowiki>
+
| style="text-align: right;" | {{flagright|Kelssek}}
+
| Uses {{tl|Country data Kelssek}} to know which flag to use and which article to link to.
+
|}
+
 
+
Other parameters include:
+
 
+
{| class="wikitable"
+
! style="text-align: center;" | Wikicode
+
! style="text-align: center;" | Result
+
! width="600" | Notes
+
|-
+
| <nowiki>{{flagright|Liventia|2}}</nowiki>
+
| style="text-align: right;" | {{flagright|Liventia|2}}
+
| The "variant" parameter and second unnamed parameter (they function identically) can be used to display a historical or alternative flag. Possible variants are listed on each country's respective country data template (in this example {{tl|Country data Liventia}}.
+
|-
+
| <nowiki>{{flagright|Liventia|size=40px}}</nowiki>
+
| style="text-align: right;" | {{flagright|Liventia|size=40px}}
+
| The "size" parameter changes the size of the flag icon (in this example, its width is specified). Default size for flag icons is 23x15px (no more than 23px wide, no more than 15px high), though some entities have a different default size specified in their respective country data template.
+
|-
+
| <nowiki>{{flagright|Cafundeu|name=Cafundéu}}</nowiki>
+
| style="text-align: right;" | {{flagright|Cafundeu|name=Cafundéu}}
+
| The "name" parameter changes the default displayed name to the specified name, while linking to the same article.
+
|}
+
 
+
<includeonly>{{Sandbox other||
+
[[Category:Flag template system]]
+
 
+
}}</includeonly>
+
 
+
 
</noinclude>
 
</noinclude>

Revision as of 23:45, 18 September 2019

{{country data {{{1}}}|flagright/flag|variant=|size=|name=}}

Documentation icon Template documentation[view] [edit] [history] [purge]

This template works like the {{flag}} template, but displays the flag to the right of the country name.

The template can display every country/territory with a "Country data ..." template, and abbreviations are also possible:

Wikicode Result Notes
{{flagright|Kelssek}} Kelssek  Uses {{Country data Kelssek}} to know which flag to use and which article to link to.

Other parameters include:

Wikicode Result Notes
{{flagright|Liventia|2}} Liventia  The "variant" parameter and second unnamed parameter (they function identically) can be used to display a historical or alternative flag. Possible variants are listed on each country's respective country data template (in this example {{Country data Liventia}}.
{{flagright|Liventia|size=40px}} Liventia  The "size" parameter changes the size of the flag icon (in this example, its width is specified). Default size for flag icons is 23x15px (no more than 23px wide, no more than 15px high), though some entities have a different default size specified in their respective country data template.
{{flagright|Cafundeu|name=Cafundéu}} Cafundéu  The "name" parameter changes the default displayed name to the specified name, while linking to the same article.