Template:Navbox with collapsible groups/doc

From PathfinderWiki

This template produces a navigational template that has groups of relevant articles on a certain topic. All groups are hidden by default. However, with a parameter call, an individual group can be shown that has the other articles in the same group.

For simpler navboxes that do not require multiple collapsible groups, use {{Navbox}}.

Usage

Please remove the parameters that are left blank. The template currently supports up to 10 groups/lists but more can be added if needed. If you do not need more than two groups/lists, use {{Navbox}} instead.

{{Navbox with collapsible groups
| name     = {{subst:PAGENAME}}
| state    = 
| selected = {{{1|}}}

| title      = 
| image      = 
| above      = 

| group1 = 
| abbr1  = 
| list1  = 

| group2 = 
| abbr2  = 
| list2  = 

 ...

| group10 = 
| abbr10  = 
| list10  = 

| below = 
}}

Parameters

This template shares many common parameters with its sister template {{Navbox}}. The common parameters are marked with a cross. Please refer to the documentation of {{Navbox}} for more in depth descriptions and examples of those parameters.

Setup parameters

name
The name of the template. The name of this template, for example, is "Navbox with collapsible groups".
state [uncollapsed, collapsed, off]
The initial state of the show/hide feature for the main title only. See {{Navbox}} for more information. Does not affect display or hiding of group items, see staten, below.
collapse [uncollapsed, collapsed, off]
The initial state of the show/hide feature for all groups. Set to collapsed by default. See {{Navbox}} for more information. This can be overridden for individual groups with staten, below.

Basic data parameters

title
The title of the template, displayed centered in the titlebar at the top of the template.
above
Text or other elements to appear above groups/lists.
image
An image to be displayed in a cell below the title and to the right of the body (the groups/lists). For the image to display properly, the list1 parameter must be specified. The image parameter accepts standard wikicode for displaying an image, e.g.:
[[File:XX.jpg|90px|link=|alt=]]
below
Text or other elements to appear below the groups/lists.

Group/list parameters

groupn
The title of each section.
listn
The content/wikilinks that will be shown in the group. Use dots or bullets as separators. A {{Navbox}} can optionally be used here with its border = child parameter set. If this is done, leave the corresponding groupn blank as the child navbox provides the collapsible feature.
abbrn
This is the abbreviation of the group. See selected parameter immediately below to see how to use this parameter. This parameter is optional but recommended.
selected
If the value of selected equals the value of abbrn, then listn is uncollapsed and all other lists are collapsed. If selected is left blank, or if it does not match any abbrn, then all groups are collapsed. This parameter should typically be set to {{{1|}}}. Since this template is a base template for others, there has to be a way to pass the group parameter from the article, to the secondary template, to this one.
To assist users of the new navbox, list the collapsed/uncollapsed options on the template's {{Documentation}} page transcluded in the <noinclude> section.
staten [autocollapse, uncollapsed, collapsed, plain, off]
The initial collapsible state of listn. Set to collapsed by default. Overridden to uncollapsed if selected equals abbrn.
imagen
An image to appear in the listn content area on the right side.

Examples

Basic example

{{Navbox with collapsible groups
| name      = {{{name|Archdevils}}}
| title     = {{{title|Powers of [[Hell]]}}}
| selected  = {{{1|}}}

| group1 = [[Archdevil]]s
| abbr1  = archdevils
| list1  = 
* '''Existing archdevils:''' [[Barbatos]]
* [[Dispater]]
* [[Mammon]]
* [[Belial]]
* [[Geryon]]
* [[Moloch]]
* [[Baalzebul]]
* [[Mephistopheles]]
* [[Asmodeus]]

'''Deceased archdevils:''' [[Typhon]]

| group2 = [[Infernal duke]]s
| abbr2  = dukes
| list2  = 
* [[Alocer]]
* [[Bifrons]]
* [[Caacrinolaas]]
* [[Canzoriant]]
* [[Crocell]]
* [[Deumus]]
* [[Eaqueo]]
* [[Eligos]]
* [[Furcas]]
* [[Gaap]]
* [[Haborym]]
* [[Iaozrael]]
* [[Jiraviddain]]
* [[Kalma]]
* [[Làu Kiritsu]]
* [[Leccas]]
* [[Lorcan]]
* [[Lorthact]]
* [[Losarkur]]
* [[Malthus]]
* [[Nergal]]
* [[Oriax]]
* [[Osdri]]
* [[Ose]]
* [[Pirias]]
* [[Quindiovatos]]
* [[Rasvocel]]
* [[Ruithvein]]
* [[Ruzel]]
* [[Sabnach]]
* [[Titivilus]]
* [[Uruskreil]]
* [[Vapula]]
* [[Vassago]]
* [[Vois]]
* [[Wylgart]]
* [[Xhasnaphar]]
* [[Yan-gant-y-tan]]
* [[Zaebos]]
* [[Zepar]]

| group3 = [[Queen of the Night|Queens of the Night]]
| abbr3  = queens
| list3  = 
* [[Ardad Lili]]
* [[Doloras]]
* [[Eiseth]]
* [[Mahathallah]]

| group4 = [[Malebranche]]
| abbr4  = malebranche
| list4  =
* [[Alichino]]
* [[Barbariccia]]
* [[Cagnazzo]]
* [[Calcabrina]]
* [[Circiatto]]
* [[Draghignazzo]]
* [[Farfarello]]
* [[Graffiacane]]
* [[Libicocco]]
* [[Malacoda]]
* [[Rubicante]]
* [[Scarmiglione]]

| group5 = Other divine beings of Hell
| abbr5 = otherhell
| list5 = 
* [[Astaroth]]
* [[Asura rana]]s
* [[Dahak]]
* [[Erecura]]
* [[General Susumu]]
* [[Glasya-Labolas]]
* [[Minderhal]]
* [[Nahemah]]
* [[Nybbas]]
* [[Orobas]]
* [[Xaphan]]
* [[Yaezhing]]
* [[Zursvaater]]
}}
<noinclude>
{{Documentation}}
[[Category:Navboxes|Archdevils]]
</noinclude>

Nesting other Navbox forms

This example shows {{Navbox}} and {{Navbox with collapsible groups}} working together. Press the edit button for the section to view the code. Note that each of the child navboxes has the first parameter set to child.