Template:Navigation

From Wikipedia, the free encyclopedia

This template documentation is transcluded from Template:Navigation/doc [edit]

{{Navigation}} is a generic navigational template.

Contents

Blank

{{Navigation
| name  = {{subst:PAGENAME}}
| title = 
| body  = 
}}

Parameters

Mandatory

name (or templateName)
The name of the template, which is needed for the "view · talk · edit" links to work properly on all of the pages where the template is used on. You can enter {{subst:PAGENAME}} for this value as a shortcut.
title (or header)
Text that appears centered in the titlebar (the top bar). Usually this is the template's topic, i.e. a succinct description of the body contents.
body
The material contained by the template, usually a list or list of links. Use | to separate links. It is not possible to include a pipe ("|") in the contents as this symbol is used to separate parameters. Format is inline.

Optional

color
Header color. Default is #efefef. Use of this parameter is discouraged. Care/consensus needed when using this parameter as multiple navigational templates on one page using different titlebar colors is likely to look unpleasant.
cat (or category)
The category or categories to which a page sporting the template will become a member.

Auto collapse logic

A navbox will start out collapsed if there are 4 or more tables on the same page that is implemented with NavFrame. For the technical minded, see MediaWiki:Common.js.

See also Wikipedia:NavFrame.

Example

Code

{{Navigation
| name  = {{subst:PAGENAME}}
| title = [[Countries of the world|Countries]] of [[Central Asia]]
| cat   = [[Category:Central Asian countries]]
| body  =
[[Afghanistan]]{{·}}
[[Kazakhstan]]{{·}}
[[Kyrgyzstan]]{{·}}
[[Mongolia]]{{·}}
[[Russia]]{{·}}
[[Tajikistan]]{{·}}
[[Turkmenistan]]{{·}}
[[Uzbekistan]]
}}

Result

See also

v d e
Collapsible Image Groups Default Header Color Style Parameter Real Example
{{Navigation}} Using NavFrame No No #efefef No {{OPEC}}
{{Navigation with image}} Using NavFrame Left/right to the body No #efefef No {{Arab League}}
{{Dynamic navigation box}} Using collapsible No No #ccccff Yes {{CSUHeads}}
{{Dynamic navigation box with image}} Using NavFrame Upper left No #efefef No {{SPDHeads}}
{{Navbox generic}} Using collapsible No Yes #ccccff Yes {{Dilbert}}
{{NavigationBox}} No Right to both header and body No #ccccff No {{GermanPresidents}}
{{NavigationBox}} Broken
{{Dynamic navigation box}} Using NavFrame No No #ccccff No
{{Dynamic navigation box with image}} Using NavFrame Upper left No #efefef No
autocollapse logic custom initial state hide/show position
NavFrame 4 or more of the same No Right
collapsible 2 or more of the same Yes Left

{{NavigationBox}} (Image breaks titlebar; template deprecated? David Kernow (talk) 02:23, 29 November 2006 (UTC))