Difference between revisions of "Kerbal Space Program Wiki:Navigation templates"

From Kerbal Space Program Wiki
Jump to: navigation, search
(Partial import from Wikipedia (CC BY-SA license) to get the page started. I anticipate it having a bit of variation from their page, tailored to our specific needs.)
 
m (+navbox)
 
Line 49: Line 49:
  
 
{{Navigation templates}}
 
{{Navigation templates}}
 +
{{Project navboxes}}
  
 
[[Category:Navigational boxes| ]]
 
[[Category:Navigational boxes| ]]

Latest revision as of 14:23, 9 June 2015

A navigation template 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.

There are two main varieties of navigation template: navigation boxes (or navboxes), designed to sit at the very bottom of articles, and sidebars, designed to sit at the side of the article text. The two are complementary and either or both may be appropriate in different situations.

The usual way to create navigation templates is to use the {{navbox}} or {{sidebar}} master templates. This simplifies the process of creating a functional and consistent template.

Navboxes are categorized under Category:Navigational boxes.

Types

The two main types of navigation template are navboxes and sidebars. The two serve similar purposes: to allow related subjects to link to each other easily in a consistent manner.

  • Navboxes are footer templates that sit below the standard article appendices and are laid out horizontally. They are created using the {{navbox}} template. An example navbox template is shown below:

  • Sidebars sit alongside content, in the same manner as infoboxes, and are predominantly laid out vertically. They are created using the {{sidebar}} template. An example sidebar is shown to the right:

The two types are used interchangeably, and either or both may be appropriate in different circumstances. The primary differences between the two are:

  • Navboxes are laid out horizontally, and so work best for longer lists of links in a small number of sub-categories. As they are placed at the very bottom of articles, they are better for broader lists of links than would be appropriate in a sidebar. Articles often have more than one navbox and content may overlap to a degree: nevertheless, not everything needs a navbox, so navbox templates should only be created when they would be genuinely useful as navigational tools.
  • Sidebars are laid out predominantly vertically, and are placed relatively prominently in the body of articles alongside the text. This makes them useful for smaller amounts of directly relevant links. Tangential information should be kept out of sidebars. Few articles have more than one sidebar.

Template:-

Template limits

→ Main article: w:Help:Templates#Template limits

There are limits to the number of templates an article may have. When a page exceeds this limit it may look fine in preview but, after the edit is saved, one or more footer navboxes display as wikilinks to the now excess navboxes (for example, displaying a link to "Template:Navbox" rather than the Navbox template itself). Solutions for this problem include (a) removing a template, (b) setting up the footer navboxes so the least important one becomes the "extra" navbox (the one the reader will have to navigate to a separate page to in order to view), and (c) using the {{Navboxes}} template to show multiple navboxes.

See also


Navigation templates comparison
Collapsible Header color Image Groups Style (body)
parameter/s
Examples
{{Navbox}} collapsible navbox Left/right of body Yes Yes
{{Navbox with collapsible groups}} collapsible navbox Left/right of body and/or in each list Yes Yes
{{Navbox with columns}} collapsible navbox Left/right of columns No Yes
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