Tractor & Construction Plant Wiki
Register
Advertisement

A navigation template, navbox or topicbox is a grouping of links used in multiple related articles to facilitate navigation between those articles. Editing of a navigation template is done in a central place, the template page.

Navboxes are categorised under Category:Navigational boxes. Some WikiProjects maintain a list of their navigation templates.

Properties[]

The style of any navigation template depends on its articles, how they are most intuitively presented, and previously established convention.

Navigation templates provide navigation within Tractor Wiki
  • The goal is not to cram as many related articles as possible into one space. Ask yourself, does this help the reader in reading up on related topics? Take any two articles in the template. Would a reader really want to go from A to B?
  • They should be kept small in size as a large template has limited navigation value. For navigating among many articles, consider:
    • Split them into multiple, smaller templates on each sub-topic. For example, {{EMD diesels}} lists all models of diesel locomotives built by one manufacturer, but is too large to be transcluded on each of their articles. Instead, the individual sections of {{EMD diesels}} were split out into their own templates: {{EMD GPs}}, {{EMD SDs}}, etc.
    • Do the above with only one template using ParserFunctions.
    • Link only the immediately related articles while hiding the rest, like in the case of Johnny Cash.
    • Avoid repeating links to the same article within a template.
  • They should not be too small. A navigation template with fewer than a handful of links can easily be replaced by "See also" sections, or relevant {{main}} and {{see also}} links within the articles' sections.
  • Navigation templates should not be used to provide WP:External links to other websites.
Navigation templates provide navigation between existing articles
  • Red links should be avoided unless they are very likely to be developed into articles, and even if they do, editors are encouraged to write the article first.
  • Unlinked text should be avoided. For example, {{wikipedia:Axis of Justice}} lists non-articles under "Notable guests", but this content seems more appropriate in an article.
  • External links should be included in appropriate articles, "External links" section rather than a navigation template.
Navigation templates provide navigation between related articles
  • If the articles are not established as related by reliable sources in the actual articles, then it is probably not a good idea to interlink them.
  • For complex topics in science, technology, history, etc., a navigation box can provide a comprehensive introduction to a topic. For example, {{Wind power}} links to subsidiary and supporting topics that provide background and context necessary for understanding the main Wind power article. While the main Wind power article already contains inline links to the subsidiary articles, the subsidiary articles themselves are smaller and their prose may not place them into the overall context with each other. Editors who work on the subsidiary articles in isolation may be unaware of this context. The navigation template provides an easy way for the subsidiary articles, even when they begin as stubs, to instantly inherit the conceptual structure of the main article.
Navigation templates are not arbitrarily decorative
See also: Tractor & Construction Plant Wiki:Manual of Style (icons)
  • There should be justification for a template to deviate from standard colors and styles
  • There are two basic layouts:
    • On the right side of page—for example {{History of China}}.
    • Footer boxes—for example {{Health in the People's Republic of China}}, designed to appear at the bottom of each article, stacked with other similar templates. See also: Tractor & Construction Plant Wiki:Footers for information on placement
      • For footer boxes, {{Navbox}} is the standard.
        • Existing hard-coded collapsible tables or NavFrames should be converted to {{Navbox}} if possible. This standardizes the look and eases future maintenance.
        • The width of footer boxes should be 100% unless the convention for that type of article is otherwise. It looks inconsistent if multiple boxes in the same article have varying widths.

Avoid redirects
  • The link to the page on which a particular instance of a navbox appears should be displayed in black, bold type, not as a link. This will happen automatically, provided all links go directly to their target pages, avoiding redirects. (Piped links are perfectly all right.)
  • In the rare event that a navbox contains a link to a disambiguation page that doesn't have "(disambiguation)" in its title, use the {{D'}} template to resolve the conflict between this requirement and the requirements concerning intentional links to disambiguation pages.

Advantages[]

See also: Tractor & Construction Plant Wiki:A navbox on every page#Benefits of navboxes

Advantages of using navigation templates rather than listing all the links under "See also" sections include:

  • reduction of clutter in that area of the article before "References" and "External links",
  • compactness of the template compared to a standard list or table, in the case of many links,
  • if the most immediately related links are kept under "See also", the reader has a better idea of scope,
  • less directly related links are out of the way or in some cases hidden by default,
  • ease of maintenance in updating the template as articles get created or deleted,
  • aesthetically pleasing appearance to many users,
  • new articles in a subject area immediately gain the basic link structure of existing related articles, eliminating the need for many editors to individually build up their own links and rewrite background material.
  • when a new article or an older article that was orphaned is placed in a navbox, the page instantly has a large number of links to it

Alternatives[]

In certain cases, there are alternatives preferable over the creation of a new navigation template.

  • If the group of articles overlaps significantly with an existing category, consider using {{otherarticles}} instead. Of course, since the category is already linked within those articles, {{otherarticles}} may not even provide extra navigational value.
  • For a series of articles whose only shared characteristic is that they hold the same position or title, such as peerage or world champion sporting titles, consider using {{succession box}}. Variant templates for persons who have held several notable offices are discussed at Template talk:Succession box.
  • For relating articles across different categories in a logical sequence, use a succession template.

Building navboxes[]

The following are various components used in navboxes:

Code Purpose
{{Navbox Defines the start of a navbox
}} Defines the end of a navbox
| name = Example Reflects the url of the navbox, and the name of the template to be added to articles. E.g. {{Example}}
| title = [[Example]] Displays the title contained in the top bar
| above = [[Example]] Produces a second bar beneath the top bar
| state= expanded Forces the navbox to remain expanded (or collapsed) in articles. The template transclusion itself can override to specify a different state
| titlestyle = background:#FF033E; Changes the background colour of the top bar (Normally to be avoided)
| groupstyle = background:#FF033E; Changes the background colour of the vertical bar on left side (Normally to be avoided)
| abovestyle = background:#FF033E; Changes the background colour of the second bar (beneath the top bar) (Normally to be avoided)
| belowstyle = background:#FF033E; Changes the background colour of the bottom bar (Normally to be avoided)
| evenstyle = background:#F4F0EC Alternates colours for each section
| oddstyle = background:#F4F0EC Alternates colours for each section
| image = [[Image:Example.svg|80px|border|Caption]]

| imageleft = [[Image:Example.svg|80px|border|Caption]]

Displays an image inside the navbox on the right or left side
| group1= [[Example]] Displays the group title in vertical bar on left side
| list1= [[Item]] {{•w}} [[Item]] Displays items of the group within the body of the navbox
{{Navbox subgroup}} Creates subgroups within the main group. Example:
|group1 = Example group
|list1 = {{Navbox subgroup
|group1 = Subgroup 1
|list1 = [[Item]] {{•w}} [[Item]]
|group2 = Subgroup 2
|list2 = [[Item]] {{•w}} [[Item]]
}}
{{•w}} Separates items with a large dot
| below = [[Example]] Displays bottom bar
{{collapsible option}} Displays text below navbox giving instruction on collapsing and expanding
<noinclude>Example text</noinclude> Prevents "Example text" from appearing in articles containing the navbox (This should be placed immediately after the closing brackets "}}" at the end of the navbox)

Example navbox[]

What you type[]

{{Navbox
| name = Example
| title = [[Example]]
| above = [[Example]]

| state = {{state=expanded}}

| titlestyle = background:#FFC569;
| abovestyle = background:#FFC569;
| groupstyle = background:#FFC569;
| belowstyle = background:#FFC569;

| evenstyle = background:#F4F0EC;

| image = [[File:Example.jpg|70px|Caption]]

| group1 = Example group 1
| list1 = Item {{w}} Item {{w}} Item

| group2 = Example group 2
| list2 = Item {{w}} Item {{w}} Item

| group3 = Example group 3
| list3 = {{Navbox subgroup
  | group1 = Subgroup 1
  | list1 = Item {{w}} Item {{w}} Item
  | group2 = Subgroup 2
  | list2 = Item {{w}} Item {{w}} Item
  }}

| group4 = Example group 4
| list4 = Item {{w}} Item {{w}} Item

| group5 = Example group 5
| list5 = Item {{w}} Item {{w}} Item

| group6 = Example group 5
| list6 = Item {{w}} Item {{w}} Item

| below = Example

}}
<noinclude>
{{collapsible option}}
</noinclude>

What it looks like[]

Note to editors on how to manage collapsibility:

  • Use {{Navigation templates|state=collapsed}} to show this template in its collapsed (hidden) state.
  • Use {{Navigation templates|state=expanded}} to show this template in its expanded (fully visible) state.
  • Use {{Navigation templates|state=autocollapse}} to show this template in its collapsed (hidden) state only if there is another template of the same type on the page. (This is usually the default.)


See also[]

  • Tractor & Construction Plant Wiki:Template namespace for an introduction to templates
  • Tractor & Construction Plant Wiki:Requested templates for help in editing templates
  • Tractor & Construction Plant Wiki:Categories, lists, and navigation templates, for an actual guideline on the subject
  • Tractor & Construction Plant Wiki:Template messages, for other types of templates
  • Tractor & Construction Plant Wiki:Related information, optional navbox heading
  • Tractor & Construction Plant Wiki:Manual of Style (infoboxes)
  • Tractor & Construction Plant Wiki:Article series, related information
  • Tractor & Construction Plant Wiki:Series templates, related information
  • Wikipedia:A navbox on every page, an essay
  • Wikipedia:Not everything needs a navbox, another essay


Navigation templates comparison
view · talk · edit Collapsible Header color Image Groups Style (body)
parameter/s
Examples
{{Navbox}} collapsible navbox Left/right of body Yes Yes
  • {{Solar System}}
  • {{United States Congress}}
{{Navbox with collapsible groups}} collapsible navbox Left/right of body and/or in each list Yes Yes
  • {{Scouting}}
  • {{University of Michigan}}
{{Navbox with columns}} collapsible navbox Left/right of columns No Yes
  • {{Current U.S. Senators}}
  • {{Historical regions of the Czech Republic}}
{{Navbox years}} collapsible navbox No No No
  • {{Wimbledon tournaments}}
Collapsible attributes
Type CSS classes Javascript Collapses when Custom
initial state
Nesting
Collapsible tables collapsible Defined in Common.js 2 or more autocollapse on page Yes Yes

Wikipedia-logo-v2 Related articles navigation templates at Wikipedia


Advertisement