Template:Flagged: Difference between revisions

Create Flagged template: 25px authority flag + wikilink for infobox reportsto/fleet fields
 
m Map First Fleet to HomeFleet.png (First Fleet = Home Fleet)
Line 5: Line 5:
|Eighth Fleet=[[File:EighthFleet.png|25px|link=Eighth Fleet]] 
|Eighth Fleet=[[File:EighthFleet.png|25px|link=Eighth Fleet]] 
|Tenth Fleet=[[File:TenthFleet.png|25px|link=Tenth Fleet]] 
|Tenth Fleet=[[File:TenthFleet.png|25px|link=Tenth Fleet]] 
|First Fleet=[[File:HomeFleet.png|25px|link=First Fleet]] 
|Home Fleet=[[File:HomeFleet.png|25px|link=Home Fleet]] 
|Home Fleet=[[File:HomeFleet.png|25px|link=Home Fleet]] 
|Victoria Station=[[File:VictoriaStation.png|25px|link=Victoria Station]] 
|Victoria Station=[[File:VictoriaStation.png|25px|link=Victoria Station]] 
Line 14: Line 15:
== Usage ==
== Usage ==
* <code><nowiki>{{Flagged|Tenth Fleet}}</nowiki></code> &rarr; {{Flagged|Tenth Fleet}}
* <code><nowiki>{{Flagged|Tenth Fleet}}</nowiki></code> &rarr; {{Flagged|Tenth Fleet}}
* <code><nowiki>{{Flagged|First Fleet}}</nowiki></code> (no flag on file) &rarr; {{Flagged|First Fleet}}
* <code><nowiki>{{Flagged|First Fleet}}</nowiki></code> (First Fleet = Home Fleet) &rarr; {{Flagged|First Fleet}}
* <code><nowiki>{{Flagged|Task Group 92.1|TenthFleet.png}}</nowiki></code> (explicit flag override) &rarr; {{Flagged|Task Group 92.1|TenthFleet.png}}
* <code><nowiki>{{Flagged|Task Group 92.1|TenthFleet.png}}</nowiki></code> (explicit flag override) &rarr; {{Flagged|Task Group 92.1|TenthFleet.png}}


Line 21: Line 22:
'''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: 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: 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>