TemplateDoc:Rank/HW

Revision as of 18:16, December 15, 2021 by Superintendent (talk | contribs) (→‎Dependent templates: Moving page, removed: *Template:Documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is a template documentation page!
You cannot edit the associated template from here. To do so, please see Template:Rank/HW instead!

DescriptionEdit

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.

UsageEdit

SyntaxEdit

To insert this template onto a page, place the following wikitext onto the article.

{{Rank/HW}}

ParametersEdit

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 statesEdit

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.

ExampleEdit

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

DependenciesEdit

Template dependenciesEdit

This template depends on the following templates. It does depend on the images found at Category:Halo 3 rank insignia.

Extension dependenciesEdit

This template does not require any extensions.

Dependent templatesEdit

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!