Template:Flagged: Difference between revisions

m Map First Fleet to HomeFleet.png (First Fleet = Home Fleet)
m Add First Space Lord / 1SL flag (1SL_Main_Flag.png)
 
Line 1: Line 1:
<includeonly>{{#if:{{{2|}}}|[[File:{{{2}}}|25px|link={{{1}}}]]&nbsp;[[{{{1}}}]]|{{#switch:{{{1}}}
<includeonly>{{#if:{{{2|}}}|[[File:{{{2}}}|25px|link={{{1}}}]]&nbsp;[[{{{1}}}]]|{{#switch:{{{1}}}
|First Space Lord=[[File:1SL_Main_Flag.png|25px|link=First Space Lord]]&nbsp;
|1SL=[[File:1SL_Main_Flag.png|25px|link=1SL]]&nbsp;
|Second Fleet=[[File:SecondFleet.png|25px|link=Second Fleet]]&nbsp;
|Second Fleet=[[File:SecondFleet.png|25px|link=Second Fleet]]&nbsp;
|Third Fleet=[[File:ThirdFleet.png|25px|link=Third Fleet]]&nbsp;
|Third Fleet=[[File:ThirdFleet.png|25px|link=Third Fleet]]&nbsp;
Line 22: Line 24:
'''Parameter 2''' (optional): a flag image filename to use instead of the lookup — for authorities that have a flag but aren't in the map yet.
'''Parameter 2''' (optional): a flag image filename to use instead of the lookup — for authorities that have a flag but aren't in the map yet.


Because this wiki has no string functions, the flag filename can't be derived from the name automatically; mapped commands live in a <code><nowiki>{{#switch:}}</nowiki></code> inside the template. '''To add a flag''', add a line <code><nowiki>|Name=[[File:NameNoSpaces.png|25px|link=Name]]&nbsp;</nowiki></code>. Currently mapped: First (= Home), Second, Third, Sixth, Eighth, Tenth &amp; Home Fleet, Victoria Station, and the Royal Manticoran Navy.
Because this wiki has no string functions, the flag filename can't be derived from the name automatically; mapped commands live in a <code><nowiki>{{#switch:}}</nowiki></code> inside the template. '''To add a flag''', add a line <code><nowiki>|Name=[[File:NameNoSpaces.png|25px|link=Name]]&nbsp;</nowiki></code>. Currently mapped: the [[First Space Lord]] (and 1SL), First (= Home), Second, Third, Sixth, Eighth, Tenth &amp; Home Fleet, Victoria Station, and the Royal Manticoran Navy.


[[Category:Formatting]]
[[Category:Formatting]]
[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>