Template:Navbox/doc: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<noinclude>{{Docsub}}</noinclude> The {{tl|navbox}} template makes setting up a {{wp|navigation template}} simple by supplying it with one or more lists of links. It supports up to 15 groups of links. The title, sub-title, footer, and group name background colors may be customized using {{wp|web colors}} (names or hex code being the most common formats). An image may be optionally displayed at the right of the box. == Usage == To use the template, copy and paste the fol...") |
mNo edit summary |
||
Line 49: | Line 49: | ||
| {{code|group1}} || Group1 description || String || Optional || | | {{code|group1}} || Group1 description || String || Optional || | ||
|- | |- | ||
| {{code|list1}} || First group list || String || '''Required''' || | | {{code|list1}} || First group list || String || '''Required''' || Displays full-width if {{code|group1}} is omitted or blank | ||
|- | |- | ||
| {{code|group<sub>n</sub>}} || Additional group description(s) || String || Optional || Up to 15 total groups and lists are supported | | {{code|group<sub>n</sub>}} || Additional group description(s) || String || Optional || Up to 15 total groups and lists are supported |
Revision as of 22:07, 18 January 2025
This is a documentation subpage for Template:Navbox. It may contain usage information, categories and other content that is not part of the original template page. |
The {{navbox}} template makes setting up a navigation template simple by supplying it with one or more lists of links. It supports up to 15 groups of links. The title, sub-title, footer, and group name background colors may be customized using web colors (names or hex code being the most common formats). An image may be optionally displayed at the right of the box.
Usage
To use the template, copy and paste the following in a new template page (for example, Template:Countryname topics
). Then add the appropriate parameter values.
{{Navbox | title = | title_background = | state = | above = | above_background = | image = | image_size = | image_alt = | group_background = | group1 = | list1 = | group2 = | list2 = <!-- ... --> | below = | below_background = }}
Parameters
Optional parameters are not displayed if left blank.
Parameter | Description | Type | Status | Notes |
---|---|---|---|---|
title |
Navbox title | String | Required | |
title_background |
Title bar background color | String | Optional | Defaults to #ccccff ()
|
state |
Collapsed or expanded initial display | String | Optional | Default is collapsed; set to expanded for expanded initial display
|
above |
Sub-title or upper explanatory text | String | Optional | |
above_background |
Sub-title bar background color | String | Optional | Defaults to #ddddff ()
|
image |
Image filename | String | Optional | |
image_size |
Image size | String | Optional | Default is 80px
|
image_alt |
Image alternate text | String | Optional | |
group_background |
Group cell background color | String | Optional | Defaults to #ddddff ()
|
group1 |
Group1 description | String | Optional | |
list1 |
First group list | String | Required | Displays full-width if group1 is omitted or blank
|
groupn |
Additional group description(s) | String | Optional | Up to 15 total groups and lists are supported |
listn |
Additional group list(s) | String | Optional | Associated group must have a value to display. For example, if group2 is empty, list2 will not display.
|
below |
Footer | String | Optional | |
below_background |
Footer bar background color | String | Optional | Defaults to #ddddff ()
|
Example
{{Navbox | title = Subject articles | above = Example of a navbox | group1 = First group | list1 = [[First article]] ● [[Second article]] | group2 = Second group | list2 = [[Another article]] ● [[Last article]] | below = [[:Category:Templates|Category]] }}
Subject articles | |||
Example of a navbox | |||
First group | First article ● Second article
| ||
Second group | Another article ● Last article | ||
Category |