Template:Navbox/doc

This template is a more efficient version of Template:Navibox, designed as a base template for naviboxes.

''This template is based on a modified version of Navbox by Tjcool07. In cases where this documentation is unclear, the standard documentation can be used as a reference, but be aware that this version has been modified. Certain features have been removed and functionality has been changed.''

Example of use of this template: Template:Marine Navibox

How to Use It
The template is composed of 4 primary parts:
 * The "title" part, which is colored and centered. It is the only part visible when the template is collapsed. (Marines)
 * The "header" parts, which are colored and centered. They are used to split subsections in the navbox. (Former Marines, Transportation)
 * The "group" parts, which are left-aligned. They define the rows in the navbox. (Marine Officers, Subordinates and Others)
 * The "list" parts, which are right-aligned. They define the primary content of the navbox.

Global
Alongside those parts, there exist "global" parameters that define multiple aspects in the navbox. These are:
 * colorscheme: The primary colorscheme to be used in the title, header, and group portions of the navbox. In cases where the colorscheme isn't specified, these arguments can be used to manually set colors:
 * backcolor: The background color to be used in the relevant portions. This should be defined as a hex triplet, without the preceding pound (#) sign.
 * textcolor: The text color to be used in the relevant portions. This should be defined as a hex triplet, without the preceding pound (#) sign.
 * state: Defines the beginning expanded state of the navbox. Defaults to collapsed, but can be set to "plain" to create a navbox that is open by default. In either case, the navbox will be collapsible.

Title Part
The title part has 2 parameters:
 * title: The content of the title bar, which can be a link.
 * template: The name of the template being created. This should be identical to the address of the template you're creating; for example, the template argument in Template:Marine Navibox is "Marine Navibox".

The title will always receive its colors from colorscheme, backcolor, and/or textcolor (see ).

Header Part
The header part has 3 (to 5) parameters:
 * header#: This defines the content of a header bar, which can be used to create subsections in the navbox. The number used in the parameter (replacing #) dictates where the header will be placed, always being directly above the list of the same number. Note that numbers can be skipped without affecting functionality or appearance.
 * state#: Similar to the global state, this defines whether the header will be collapsible. Unlike the global parameter, this defaults to expanded and uncollapsible. Set it to "collapsed" to create a pre-collapsed subsection.
 * colorscheme#: Sets the colorscheme of the header with the same number, as well as the groups contained in it. This will override the default colorscheme parameter, but not the default backcolor and textcolor parameters.
 * backcolor#: Sets the backcolor of the header with the same number, as well as the groups contained in it. This will override the default backcolor parameter, but not the default colorscheme parameter.
 * textcolor#: Sets the textcolor of the header with the same number, as well as the groups contained in it. This will override the default textcolor parameter, but not the default colorscheme parameter.

Headers without associated lists will not appear.

Group Part
The group part has only 1 parameter, being group#. This defines the content of the group subtitle, present to the left of the associated list. Like the header, the number used in the parameter (replacing #) dictates what list the group is associated with. Note that numbers can be skipped without affecting functionality or appearance.

Groups without associated lists will not appear.

List Part
The list part has only 1 parameter, being list#. This defines the content of the list (explained in more detail below). The number used in the parameter (replacing #) dictates the order the lists will appear in, as well as what group and header will be associated with it, if any. Note that numbers can be skipped without affecting functionality or appearance.

Unlike the others, lists can exist independently of groups and headers, and will simply fill to take the width of the navbox.

Also unlike group and header, list doesn't take a single line as input. Instead, it takes an unordered list of the values to be included. To create an unordered list, list each value on a new line, preceded by an asterisk (*). To create sub-elements listed between parentheses, increase the number of asterisks.

''Note: The first entry can be on the same line as the list# parameter. Examples are included below.''

Organization
A typical organization for this template would be something like this :

''Note: For demonstration purposes, this example alternates between including the first element of a list on the same line and including it on the next line. While it functions the same either way, it's recommended to be consistent within a single navbox, if only to increase readability.''

This would output:

Most Common Mistakes
This paragraph describes the most common errors that one can make when using this template. Please read them carefully as they contain useful information.

There Are Some Abnormal Signs
If something like appears, it probably means that you forgot to set a parameter. See above for correct usage of parameters.