Template:Navbox/doc

This template allows a navigational template to be set up relatively quickly by supplying it one or more lists of links. It comes equipped with default styles that should work for most navigational templates. Changing the default styles is not recommended, but is possible. Using this template, or one of its "Navbox suite" sister templates, is highly recommended for standardization of navigational templates, and for ease of use.

Usage
Please remove the parameters that are left blank.



Parameter list
The navbox uses lowercase parameter names, as shown in the box (at right). The mandatory name and title will create a one-line box if other parameters are omitted.

Notice "group1" (etc.) is optional, as are sections named "above/below".

The basic and most common parameters are as follows (see below for the full list):


 * applies an HTML  attribute to the entire navbox.
 * the name of the template.
 * text in the title bar, such as: Widget stuff.
 * applies an HTML  attribute to the title bar.
 * controls when a navbox is expanded or collapsed.


 * a CSS style for the title-bar, such as:
 * a CSS style for the group-cells, such as:


 * an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as.
 * an optional left-side image (code the same as the "image" parameter).


 * text to appear above the group/list section (could be a list of overall wikilinks).


 * the left-side text before list-n (if group-n omitted, list-n starts at left of box).
 * text listing wikilinks, often separated by middot templates, such as: [ [A]] [ [B]]
 * optional text to appear below the group/list section.

Further details, and complex restrictions, are explained below under section Parameter descriptions. See some alternate navbox formats under: Layout of table.

Parameter descriptions
The following is a complete list of parameters for using Navbox. In most cases, the only required parameters are,  , and  , though child navboxes do not even require those to be set.

Navbox shares numerous common parameter names as its sister templates Navbox with columns and Navbox with collapsible groups for consistency and ease of use. Parameters marked with an asterisk * are common to all three master templates.

Setup parameters

 * name *
 * The name of the template, which is needed for the "v· d· e" ("view· discuss· edit") links to work properly on all pages where the template is used. You can enter  for this value as a shortcut.  The name parameter is only mandatory if a   is specified, and the   parameter is not set.


 * state * [ ]
 * Defaults to . A navbox with   will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded. For the technically minded, see MediaWiki:Common.js.
 * If set to, the navbox will always start out in a collapsed state.
 * If set to, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the v • d • e links).
 * If set to, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered.  This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
 * If set to anything other than,  ,  , or   (such as "uncollapsed"), the navbox will always start out in an expanded state, but have the "hide" button.


 * To show the box when standalone (non-included) but then auto-hide contents when in an article, put "uncollapsed" inside &lt;noinclude> tags:
 * uncollapsed
 * That setting will force the box visible when standalone (even when followed by other boxes), displaying "[hide]" but then auto-collapse the box when stacked inside an article.


 * Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this:
 * In your intermediate template, create a parameter also named "state" as a pass-through like this:
 *  | state = 
 * The | will make the template expanded when viewing the template page by itself.


 * Example: peso with autocollapse as the default initial state. Catalan peseta transcludes it and has only one navbox. So the peso navbox shows. Chilean peso has two navboxes. So the peso navbox collapses.
 * Example: Historical currencies of Hungary with expanded as the default initial state. All transcluding articles shows the content by default, unless there were an hypothetical article that specifies state = collapsed when transcluding.


 * navbar *
 * If set to, the v • d • e links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered.  Use   to remove the v • d • e links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired).  Note that it is highly recommended that one does not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.


 * border *
 * See section below on using navboxes within one another for examples and a more complete description. If set to   or , then the navbox can be used as a borderless child that fits snuggly in another navbox.  The border is hidden and there is no padding on the sides of the table, so it fits into the list area of its parent navbox.  If set to  , then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the   option inside of another navbox; similarly, only use the  /  option inside of another navbox).  If set to anything else (default), then a regular navbox is displayed with a 1px border.  An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named border parameter):