Template:Navbox/doc: Difference between revisions

From VNDev Wiki
The page keeps throwing 500 errors when I try to edit it, so I left a link to the original documentation at the bottom (which I can't uncomment because it also throws a 500 error)
 
mNo edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{{documentation subpage}}
This template allows a [[Wikipedia:Navigation templates|navigational template]] to be set up relatively quickly by supplying it with one or more lists of links.  It comes equipped with default styles that should work for most navigational templates. Changing the default styles is possible, but not recommended.  Using this template, or one of its "Navbox suite" sister templates, is highly recommended for standardization of navigational templates, and for ease of use.
This template allows a [[Wikipedia:Navigation templates|navigational template]] to be set up relatively quickly by supplying it with one or more lists of links.  It comes equipped with default styles that should work for most navigational templates. Changing the default styles is possible, but not recommended.  Using this template, or one of its "Navbox suite" sister templates, is highly recommended for standardization of navigational templates, and for ease of use.


Line 28: Line 30:
== Parameter list ==
== Parameter list ==
{{Navbox
{{Navbox
| name  = Navbox/doc
| name  = Template:Navbox
| state  = uncollapsed
| state  = uncollapsed
| title  = {{{title}}}
| title  = {{{title}}}

Latest revision as of 14:11, 23 June 2022

This template allows a navigational template to be set up relatively quickly by supplying it with one or more lists of links. It comes equipped with default styles that should work for most navigational templates. Changing the default styles is possible, but not recommended. 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.

{{Navbox
| name       = {{subst:PAGENAME}}
| listclass  = hlist
| state      = {{{state|}}}

| title      =
| above      =
| image      =

| group1     =
| list1      =

| group2     =
| list2      =
 ...
| group20    =
| list20     =

| below      =
}}

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):

Parameter Description
name Name of the template.
title Text in the title bar. May be a link.
listclass 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 CSS style for the title-bar, such as: background: gray;
groupstyle CSS style for the group-cells, such as: background: #eee;
above Text to appear above the group/list section
image Optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as [[File:XX.jpg|80px|link=|alt=]]
imageleft 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 starts at left of box)
listn Text listing wikilinks using a wikilist format
below Optional text to appear below the group/list section