Difference between revisions of "Template:Flag"

From Imperator Wiki
Jump to navigation Jump to search
m (Protected "Template:Flag": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(Added option use the second parameter as the word(s) attached to the flag (still linking to the country))
 
Line 1: Line 1:
<includeonly><span style="white-space:nowrap;">[[File:{{{1}}}.png|20px|border|alt=Flag of {{{1}}}|link={{{1}}}]] {{#ifeq:{{{2|}}}|0||[[{{{1}}}]]}}</span></includeonly><noinclude>
+
<includeonly><span style="white-space:nowrap;">[[File:{{{1}}}.png|20px|border|alt=Flag of {{{1}}}|link={{{1}}}]] {{#if: {{{2|}}}|{{#ifeq:{{{2|}}}|0||[[{{{1}}}|{{{2|}}}]]}}|[[{{{1}}}]]}}</span></includeonly><noinclude>
 +
 
 
==Usage==
 
==Usage==
 
Used to place flags inline.
 
Used to place flags inline.
Line 5: Line 6:
 
* <code><nowiki>{{flag|Rome}}</nowiki></code> generates {{flag|Rome}}
 
* <code><nowiki>{{flag|Rome}}</nowiki></code> generates {{flag|Rome}}
 
* <code><nowiki>{{flag|Rome|0}}</nowiki></code> generates {{flag|Rome|0}}
 
* <code><nowiki>{{flag|Rome|0}}</nowiki></code> generates {{flag|Rome|0}}
 +
* <code><nowiki>{{flag|Rome|Roman Empire}}</nowiki></code> generates {{flag|Rome|Roman Empire}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 04:24, 19 March 2022


Usage

Used to place flags inline.

  • {{flag|Rome}} generates Flag of Rome Rome
  • {{flag|Rome|0}} generates Flag of Rome
  • {{flag|Rome|Roman Empire}} generates Flag of Rome Roman Empire