The navbox style guide is a set of guidelines to use while creating and editing navboxes. These guidelines are here to keep the wiki code of the navboxes clean and consistent.
Parameters
Edit
All navboxes start with '{{Navbox
' with Navbox capitalised and on the first line of the template. The final '}}
' should be on a separate line at the end of the template.
- name should always match the name of the navbox without 'Template:'
- title has to be a proper description of the navbox contains, e.g. Perks for
{{Perks}}
For the other parameters see Template:Navbox/doc.
Usage
Edit
Navboxes should be used both ways, a navbox should contain a link to the article that uses the navbox and vice versa.
- Do not include redirect or disambiguation pages, use direct links.
- Do not use navboxes on redirect or disambiguation pages.
- A navbox can be created if it has at least 3 links.
Categories
Edit
Navboxes that give a category to the articles that use the navbox should use '{{Ctg|Name of category}}
' on the same line as the final '}}
'. A navbox itself can also have a category which is added with '{{Template only|[[Category:Name of category]]}}
'. Notice the difference that {{Ctg}}
does not need 'Category:' in the name of the category, but that {{Template only}}
does require the full link.
}}{{Ctg|Name of category}}{{Template only|[[Category:Name of template category]]}}
White-spacing
Edit
- Do not allow trailing spaces at the end of lines.
- A space should be placed between each parameter and its value, e.g.
parameter = value
- Do not add a space between
|
and the parameter, e.g.|gtitle1
- The exception is parameters that have a list as a value as demonstrated below:
|gtitle1 = Name of first group |group1 =<!--no space here--> * [[Link]]
Group alignment
Edit
When adding a subgroup to a navbox, do not forget to add an indent of 2 spaces. This also counts for subgroups within subgroups, these add an extra indentation of 2 spaces, e.g. when a subgroup has a subgroup that inner subgroup will have an indentation of 4 spaces. Write values for 'gtypeX' and 'subgroup' with a small letter, e.g. 'subgroup' and 'yes' instead of 'Subgroup' and 'Yes', respectively. A list of values for the parameter 'groupX' always have one space as an indentation, list values within subgroup will have a 3 space-indentation and list values within subgroups within another subgroup will have a 5 space-indentation, etc.
{{Navbox |name = Name of navbox |title = Title of navbox |gtitle1 = Name of first group |gtype1 = subgroup |group1 = {{Navbox |subgroup = yes |gtitle1 = Subgroup 1 |gtype1 = subgroup |group1 = {{Navbox |subgroup = yes |gtitle1 = Subgroup within subgroup |group1 = * [[Link]] }} |gtitle2 = Another subgroup |group2 = * [[Link]] }} }}
Inline templates
Edit
Inline templates should not have spaces between the pipe ('|
') symbol and the parameter name (or value), nor before or after the '=
' sign.
{{plink|VALUE1|pic=VALUE2|txt=VALUE3}} {{chatl|VAL1|pic=VAL2|txt=VAL3}}
Helpful templates
Edit
-
{{plink}}
, for items with an inventory sprite -
{{chatl}}
, for NPCs that have a chathead image -
{{emote link}}
, for emotes that have an emote icon -
{{QuestIcon}}
, for links to quests
Parameter value list
Edit
There should be a single space between the list character (*
) and the content of that list item.
* [[List item 1]] * [[List item 2]]
In case a link has a sublink, use <sup>([[sublink]])</sup>
to add it behind the link with a space between the link and the <sup>
tag. Add the "()"-signs outside the link and not within the alternative text of a link.
* {{plink|Ring of charos}} <sup>([[Ring of charos (a)|Activated]])</sup>
In case a link has two or more sublinks, use {{*}}
to seperate the values inline. Do not use plink for the sublinks.
* {{plink|Ardougne cloak|pic=Ardougne cloak 1}} <sup>([[Ardougne cloak 1|1]] {{*}} [[Ardougne cloak 2|2]])</sup>
Centering a group
Edit
A group without a 'gtitleX' can be centered with |style1 = text-align:center;
. It should be noted that groups with 'gtitleX' can also be centered technically, but usually are not. This is usually the first group within a navbox for the main links or for navboxes with just one group.
Edit
Below is an example of the above guidelines in action, for a stub version of an average navbox.
{{Navbox |name = Name of navbox |title = Title of navbox |gtitle1 = Name of first group |group1 = * [[Link]] }}{{Ctg|Category}}