Template:Navbox/doc

From Minecart Rapid Transit Wiki
Jump to navigation Jump to search

Usage

Please remove the parameters that are left blank.

{{Navbox
| title      =
| listclass  = hlist
| state      = collapsed

| above      =
| image      =

| group1     =
| list1      =

| group2     =
| list2      =

| group3     =
| list3      =

<!-- ... -->

| below      =
}}

Parameter list

The navbox uses lowercase parameter names, as shown in the box (above). The required 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):

name – the name of the template.
title – text in the title bar, such as: [[Widget stuff]].
listclass – a CSS class for the list cells, usually hlist for horizontal lists. Alternatively, use bodyclass for the whole box.
state – controls when a navbox is expanded or collapsed.
titlestyle – a CSS style for the title-bar, such as: background: gray;
groupstyle – a CSS style for the group-cells, such as: background: #eee;
above – text to appear above the group/list section (could be a list of overall wikilinks).
image – an optional right-side image, coded as the whole image, such as: [[File:XX.jpg|80px|link=|alt=]]
imageleft – an optional left-side image (code the same as the "image" parameter).
groupn – the left-side text before list-n (if group-n omitted, list-n extends to the left edge of the box, and defaults to text-align:center styling).
below – optional text to appear below the group/list section.

TemplateData

This is the TemplateData for this template used by VisualEditor and other tools.

TemplateData for Navbox

Creates a navigational box for links to other pages. Does not display in mobile.

Template parameters

ParameterDescriptionTypeStatus
Namename

The name of the template. Needed for "View • Talk • Edit" links to work properly.

Default
{{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}}
Stringsuggested
Titletitle

Text in the title bar; centered in the top row of the table. Usually the template's topic.

Example
[[Widget stuff]]
Unknownsuggested
Group 1group1

If specified, text appears in a header cell displayed to the left of list 1. If omitted, list 1 uses the full width of the table.

Unknownsuggested
List 1list1

Body of the template; usually a list of links. Format is inline. At least one list parameter is required; each additional list is displayed in a separate row of the table. Each listn may be preceded by a corresponding groupn parameter. Entries should be separated using a newline and an asterisk. If two asterisks are used, it provides nesting within the previous entry with brackets.

Unknownrequired
List classlistclass

CSS class for the list cells, usually hlist for horizontal lists. Alternatively, use bodyclass for the whole box.

Example
hlist
Stringoptional
Statestate

Controls when a navbox is expanded or collapsed

Suggested values
autocollapse collapsed expanded plain off
Default
autocollapse
Example
autocollapse
Unknownsuggested
Aboveabove

Full-width cell displayed between the titlebar and first group/list, i.e. above the template's body (groups, lists and image)

Stringsuggested
Belowbelow

Full-width cell displayed below the template's body.

Unknownsuggested
Imageimage

Image to be displayed in a cell below the title and to the right of the body

Example
[[File:XX.jpg | 80px | link= | alt= ]]
Filesuggested
group2group2

no description

Unknownsuggested
list2list2

no description

Unknownsuggested
group3group3

no description

Unknownsuggested
list3list3

no description

Unknownsuggested
group4group4

no description

Unknownoptional
list4list4

no description

Unknownoptional
Image leftimageleft

Image to be displayed in a cell below the title and to the left of the body. For the image to display properly, list1 parameter must be specified and no groups can be specified.

Example
[[File:XX.jpg | 80px | link= | alt= ]]
Fileoptional
Navbar statusnavbar

no description

Example
plain, off
Stringoptional
Border statusborder

no description

Example
child, subgroup, none
Stringoptional
bodystylebodystyle

no description

Unknownoptional
basestylebasestyle

no description

Unknownoptional
titlestyletitlestyle

no description

Unknownoptional
groupstylegroupstyle

no description

Unknownoptional
liststyleliststyle

no description

Unknownoptional
group1stylegroup1style

no description

Unknownoptional
list1stylelist1style

no description

Unknownoptional
groupwidthgroupwidth

no description

Unknownoptional
listpaddinglistpadding

no description

Unknownoptional
oddstyleoddstyle

no description

Unknownoptional
evenstyleevenstyle

no description

Unknownoptional
evenoddevenodd

no description

Suggested values
swap even odd off
Unknownoptional
abovestyleabovestyle

no description

Unknownoptional
belowstylebelowstyle

no description

Unknownoptional
imagestyleimagestyle

no description

Unknownoptional
imageleftstyleimageleftstyle

no description

Unknownoptional