FANDOM


Information icon This guide is written for use with the Source Mode editor.
If you have not already switched to Source Mode editor you can find out how to here.

This page is an introduction to editing and creating navboxes to help users learn how to edit and format navbox templates. Navbox templates are navigational templates found at the bottom of the articles. If you want to learn how to add a template to a page, see here.

Starting simple

  • Start a navbox with {{Navbox on the first line and end it with a }} on the last line of the template
  • On the second line add its name with |name = Name of the navbox, this has to be equal to the name of the template, e.g. the name of Template:Skilling pets is Skilling pets (the link to the template without Template:)
  • On the next line add a title to display at the top of the navbox with |title = [[Title of the navbox]], this is often used to link to the navbox's main content article, e.g. Skilling pets
  • On the next line add the group parameter to start a group to display links in with |groupX =, e.g. the first group will be |group1 =
  • On the next line add content to the group by adding an indent of 1 space followed by a * followed by another space followed by the link, e.g. * [[Some link]]
    • There are plain links, e.g. [[Skilling pets]] which produces Skilling pets
    • There are links with the inventory icon, e.g. {{plink|Brains}} which produces Brains Brains
    • There are links with the just the inventory icon, e.g. {{plinkp|Brains}} which produces Brains
    • There are links with the NPC's chathead, e.g. {{chatl|Hans}} which produces Hans chathead Hans
    • There are links for emotes with their icons, e.g. {{emote link|Bow}} which produces Bow emote icon Bow
    • To learn more about the optional parameters of these so called link templates, see their documentation: {{plink}}, {{plinkp}}, {{chatl}}, and {{Emote link}}
Markup Renders as
click on show to see the navbox
{{Navbox
|name = Skilling pets
|title = [[Skilling pets]]
|group1 =
 * {{plink|Brains pet}}
}}

Centring the group

  • It's common for a navbox with one group to center the group with |styleX = text-align:center; with X being the number of the group, in this case being 1
  • It's also common for groups without a gtitleX parameter (see next section) to be centred
  • It's also possible to center all content of the navbox with |style = text-align:center;, so style without a number
Markup Renders as
click on show to see the navbox
{{Navbox
|name = Skilling pets
|title = [[Skilling pets]]
|style1 = text-align:center;
|group1 =
 * {{plink|Brains pet}}
}}

Adding a title to the group

  • Groups can also have titles, this is done by adding gtitleX with X being the number of the group, e.g. |gtitle1 = Pets
  • It's common for group with a gtitleX parameter to not be centred, although it is technically possible
Markup Renders as
click on show to see the navbox
{{Navbox
|name = Skilling pets
|title = [[Skilling pets]]
|gtitle1 = Pets
|group1 =
 * {{plink|Brains pet}}
}}

Adding a second group

  • A second group can easily be added just like the first group, start it on a new line after the contents of the first group
  • There is a maximum of 20 groups in a navbox (not counting subgroups, but those also have the same limit), e.g. a navbox can have 20 groups with 3 of them having an X amount of subgroups
  • All group parameters (gtitleX, styleX, gtypeX, groupX) also have the same number per group (with X being the number in this example)
    • It starts with group1 (there is no group0)
Markup Renders as
click on show to see the navbox
{{Navbox
|name = Skilling pets
|title = [[Skilling pets]]
|gtitle1 = Pets
|group1 =
 * {{plink|Brains}}
|gtitle2 = Unlocks
|group2 =
 * {{plink|Brains pet}}
}}

Adding a subgroup

  • Add gtypeX = subgroup in the parent group above the groupX parameter
  • Add a subnavbox with an indent of 2 spaces
  • Instead of adding the name and title parameters, add the following parameter: |subgroup = yes
  • Continue as if it is a normal navbox with groups (or even deeper subgroups)
    • It's normal for a navbox to have a maximum of 2 subgroups deep (subgroup in a subgroup in a group), however deeper subgroups do exist, but are not recommended
Markup Renders as
click on show to see the navbox
{{Navbox
|name = Skilling pets
|title = [[Skilling pets]]
|gtitle1 = Pets
|group1 =
 * {{plink|Brains}}
|gtitle2 = Unlocks
|gtype2 = subgroup
|group2 =
  {{Navbox
  |subgroup = yes
  |gtitle1 = Gathering
  |group1 =
   * {{plink|Brains pet}}
  |gtitle2 = Artisan
  |group2 =
   * {{plink|Gemi pet}}
  }}
}}

Categories

  • To add a category to a navbox so the category is transcluded from the navbox onto the articles that use the navbox, the following can be used: {{Ctg|Name of the category}}
  • Navbox templates themselves can also have a category by adding: {{Template only|[[Category:Name of a navbox category]]}}
  • The above two templates are added at the end of the template on the same line as the closing }} as shown below
Markup Renders as
click on show to see the navbox
{{Navbox
|name = Skilling pets
|title = [[Skilling pets]]
|style1 = text-align:center;
|group1 =
 * {{plink|Brains pet}}
}}{{Ctg|Skilling pets}}{{Template only|[[Category:Item templates]]}}

See also

Want some more help?

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.