TemplateDoc:Rank/H3: Difference between revisions

From Halopedia, the Halo wiki

(Created page with "{{Notice/TemplateDoc}} ==Description== This template is used as a shorthand to insert a reference to a ''Halo 3'' multiplayer rank. Doing so will automatica...")
 
 
Line 80: Line 80:
===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!
*[[Template:Documentation]]
 


<noinclude>[[Category:Shorthand template documentation]]</noinclude>
<noinclude>[[Category:Shorthand template documentation]]</noinclude>

Latest revision as of 18:12, December 15, 2021

This is a template documentation page!
You cannot edit the associated template from here. To do so, please see Template:Rank/H3 instead!

Description[edit]

This template is used as a shorthand to insert a reference to a Halo 3 multiplayer rank. Doing so will automatically generate the rank icon and, if prompted, a link to the rank page and the rank name.

Usage[edit]

Syntax[edit]

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

{{Rank/H3}}

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
|apprentice=Apprentice
|pvt=Private
|cpl=Corporal
|sgt=Sergeant
|lt=Lieutenant
|capt=Captain
|majr=Major
|cmdr=Commander
|col=Colonel
|brig=Brigadier
|gen=General

The second input is a number, used for dictating which grade the rank is levelled at (if relevant). Accepted inputs include;

|1
|2
|3
|4

If you want to link the rank page and display the rank name, you can use one of the two following parameters for the third input;

|grade = Displays the link as Rank, Grade X (X being then number inputted in step two; or none if 1)
|G4    = Should only be used if Grade=4. Changes the rank display to the special rank name given at a rank's Grade 4.

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.

Example[edit]

Here is an example of what the template will output, when used:

Wiki markup Result
The armour can be unlocked at {{Rank/H3|recruit}}
The armour can be unlocked at H3 Rank Recruit Icon.svg
The armour can be unlocked at {{Rank/H3|recruit|1|grade}}
The armour can be unlocked at H3 Rank Recruit Icon.svg Recruit
The armour can be unlocked at {{Rank/H3|sgt|2}}
The armour can be unlocked at H3 Rank Sergeant G2 Icon.svg
The armour can be unlocked at {{Rank/H3|sgt|2|grade}}
The armour can be unlocked at H3 Rank Sergeant G2 Icon.svg Sergeant, Grade 2
The armour can be unlocked at {{Rank/H3|gen|4|grade}}
The armour can be unlocked at H3 Rank General G4 Icon.svg General, Grade 4
The armour can be unlocked at {{Rank/H3|gen|4|G4}}
The armour can be unlocked at H3 Rank General G4 Icon.svg 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.
  • Template:Rank/H3/G4 - handles turning the input for grade 4 into the alternate rank name (IE Brigadier, Grade 4 -> Brigadier General)

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!