TemplateDoc:Rank/HW: Difference between revisions
From Halopedia, the Halo wiki
BaconShelf (talk | contribs) (Created page with "{{Notice/TemplateDoc}} ==Description== This template is used as a shorthand to insert a reference to a ''Halo Wars'' multiplayer rank. Doing so will auto...") |
m (→Dependent templates: Moving page, removed: *Template:Documentation) |
||
Line 71: | Line 71: | ||
===Dependent templates=== | ===Dependent templates=== | ||
The following templates depend upon this one. If you are making changes to this template, please ensure that they will not break any of them! | The following templates depend upon this one. If you are making changes to this template, please ensure that they will not break any of them! | ||
<noinclude>[[Category:Shorthand template documentation]]</noinclude> | <noinclude>[[Category:Shorthand template documentation]]</noinclude> |
Latest revision as of 18:16, December 15, 2021
Description[edit]
This template is used as a shorthand to insert a reference to a Halo Wars multiplayer rank. Doing so will automatically generate the rank icon and, if prompted, a link to the rank page and the rank name. This template is functionally similar to Rank/H3, and operates similarly.
Usage[edit]
Syntax[edit]
To insert this template onto a page, place the following wikitext onto the article.
{{Rank/HW}}
Parameters[edit]
This template accepts four parameters, though only the first one is required. The first is a shortened version of the rank, shown below.
|recruit=Recruit |lt=Lieutenant |capt=Captain |majr=Major |cmdr=Commander |col=Colonel |brig=Brigadier |gen=General
The second input is a number, used for dictating which star-level the rank is levelled at (if relevant). This is only relevant for the General ranks introduced in Halo Wars: Definitive Edition, so shouldn't be used often. Accepted inputs include;
|1 (For most cases, you will only ever need to use this parameter) |2 |3 |4
If you want to link the rank page and display the rank name, you can use the following parameter for the third input;
|link = Displays the link as Rank, Grade X (X being then number inputted in step two; or none if 1)
Error states[edit]
This template uses the user input to generate the filename based off the ones found here. As such, inputting rank/grade combinations that do not exist will result in the template not displaying properly. As this template relies on the Halo 3 rank template info to generate, inputting Halo 3 ranks not found in Halo Wars will also result in those ranks displaying despite not appearing in Halo Wars.
Example[edit]
Here is an example of what the template will output, when used:
Wiki markup | Result |
---|---|
{{Rank/HW|recruit}} |
|
{{Rank/HW|recruit|1|link}} |
Recruit |
{{Rank/HW|lt|1|link}} |
Lieutenant |
{{Rank/HW|gen|1|link}} |
General |
{{Rank/HW|gen|4|link}} |
Five-Star General |
Dependencies[edit]
Template dependencies[edit]
This template depends on the following templates. It does depend on the images found at Category:Halo 3 rank insignia.
- Template:Rank/H3/Ranks - handles turning the input for parameter 1 into a rank full name.
- Template:Rank/H3/Icons - handles turning the input for parameter 1 into a rank name for image-link generation.
Extension dependencies[edit]
This template does not require any extensions.
Dependent templates[edit]
The following templates depend upon this one. If you are making changes to this template, please ensure that they will not break any of them!