Template:Flagged: Difference between revisions

From TenthFleet
Jump to navigation Jump to search
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>

Revision as of 21:49, 14 July 2026

⚠ UnofficialThe Tenth Fleet wiki is an unofficial repository of TRMN orders and records. Per TRMN policy, the official sources are the TRMN Forums (all orders and information) and Mantipedia (the official wiki).

Flagged renders an authority's flag/crest at 25 px in front of a wikilink to that authority — handy for the reportsto and fleet fields of infoboxes.

Usage

  • {{Flagged|Tenth Fleet}} →  Tenth Fleet
  • {{Flagged|First Fleet}} (First Fleet = Home Fleet) →  First Fleet
  • {{Flagged|Task Group 92.1|TenthFleet.png}} (explicit flag override) →  Task Group 92.1

Parameter 1 (required): the authority's page name (also the link target). If it is one of the mapped commands below, its flag is shown automatically.

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 {{#switch:}} inside the template. To add a flag, add a line |Name=[[File:NameNoSpaces.png|25px|link=Name]] . Currently mapped: First (= Home), Second, Third, Sixth, Eighth, Tenth & Home Fleet, Victoria Station, and the Royal Manticoran Navy.