Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [purge/refresh]

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.


Please remove the parameters that are left blank. The template currently supports up to 20 groups/lists. You should use a minimum of two groups/lists; otherwise, use {{Navbox}} instead.

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

|title = 
|titlestyle = 
|groupstyle = 
|image = 

|group1 = 
|abbr1 = 
|list1 =

|group2 = 
|abbr2 = 
|list2 = 


|group19 =
|abbr19 =
|list19 =

|group20 =
|abbr20 =
|list20 =


This template shares many common parameters with its sister templates {{Navbox}} and {{Navbox with columns}}. 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

The name of the template. The name of this template, for example, is "Navbox with collapsible groups".
state [collapsed, plain, off]
The initial state of the show/hide feature for the main title. See {{Navbox}} for more information. Does not affect display or hiding of group items, see staten, below.
Possible values are plain, off, and the default value of blank. See {{Navbox}} for more information.
Possible values are child, none, and the default value of blank. Set to child if you wish to use the navbox inside of another navbox; with this option, the child navbox is borderless and fits snuggly inside of its parent navbox. The parent navbox may be the list area of {{Navbox}}, the columns of a {{Navbox with columns}}, or a list area of {{Navbox with collapsible groups}}. See {{Navbox}} for more information and examples.

Basic data parameters

The title of the template, displayed centered in the titlebar at the top of the template
Text or other elements to appear above groups/lists
Image to the right of all of the groups/lists
Image to the left of all of the groups/lists
Text or other elements to appear below the groups/lists.
Text to be be displayed in place of [Show] to expand the template
Text to be be displayed in place of [Hide] to collapse the template

Group/list parameters

The title of each section.
The content/wikilinks that will be shown in the group. Use dots or bullets as separators (see the See also section). A {{Navbox}} or {{Navbox with columns}} can optionally be used here with its border = child parameter set. If this is done, leave the corresponding groupn blank, as the child navbox will already provide the collapsible feature.
This is the abbreviation of the group. See selected parameter below to see how to use this parameter. This parameter is optional, but recommended.
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. Usually this parameter should 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.
staten [collapsed, plain, off]
The initial collapsible state of listn. Set to collapsed by default. Overridden to be shown if selected equals abbrn.
An image to appear in the listn content area on the right side.
An image to appear in the listn content area on the left side.

Style parameters

CSS style/s to apply to the entire template
CSS  wp style/s to apply to titlebar; usually background: color. The color of wikilink text must be manually changed using span tags. For example use title = [[Scouting|<span style="color: ivory;">Scouting</span>]] to change the color of the link to ivory. The [show]/[hide] button and the vde link button use the color set in the titlestyle parameter. Here is an example of setting the |titlestyle = parameter
|titlestyle = background: darkgreen; color: ivory
CSS style/s to apply to the above and below parameters, respectively.
CSS style/s to apply to the title, above, below, and groupn parameters, all at the same time.
CSS style/s to apply to the image parameter. Does not get applied to the imagen parameters.
CSS style/s to apply to the imageleft parameter. Does not get applied to the imageleftn parameters.
CSS style/s to apply to all group heading parameters. Visit this website to get a lighter color similar to the title background color. Example:
groupstyle = background: lightgreen
CSS style/s to apply to a specific group heading; overrides any CSS styles set in groupstyle.
CSS style/s to apply to all list content parameters.
CSS style/s to apply to specific list content parameters; overrides any CSS styles set in liststyle.
Padding to have in each list cell; defaults to 0.25em on the left/right and 0em on the top/bottom.


Basic example

{{Navbox with collapsible groups
|name = University of Michigan
|title = <span style="color:#FD0;">The University of Michigan, Ann Arbor</span>
|titlestyle = background: #008; color: #FD0
|groupstyle = background: #FD0; color: #008
|image = 
|selected = {{{1|}}}
|state = collapsed

|group1 = <span style="color:#008;">Academics</span>
|abbr1 = academics
|list1 = College of Engineering{{·}} College of Literature, Science and the Arts{{·}} Gerald R. Ford School of Public Policy{{·}} Law School{{·}} Medical School{{·}} Ross School of Business{{·}} School of Education{{·}} School of Information{{·}} School of Music, Theatre & Dance{{·}} School of Natural Resources and Environment{{·}} School of Public Health{{·}} Taubman College of Architecture and Urban Planning

|group2 = [[Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
|abbr2 = athletics
|list2 = Michigan Stadium{{·}} Crisler Arena{{·}} Yost Ice Arena{{·}} Michigan Wolverines{{·}} Football{{·}} UM-OSU Rivalry{{·}} Little Brown Jug{{·}} Paul Bunyan Trophy{{·}} Cold War

|group3 = Campus
|abbr3 = campus
|list3 = Angell Hall Observatory{{·}} Burton Tower{{·}} The Diag{{·}} Dennison Building{{·}} Gerald R. Ford Presidential Library{{·}} Hill Auditorium{{·}} Lurie Tower{{·}} Matthaei Botanical Gardens{{·}} Michigan Union{{·}} Museums{{·}} Nichols Arboretum{{·}} UM Health System{{·}} University Library

Nesting other Navbox forms

This example shows {{Navbox}}, {{Navbox with collapsible groups}} and {{Navbox with columns}} all 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

Other Examples

{{Navbox with collapsible groups
|name  = Navbox with collapsible groups/doc#Other Examples
|title = Title - Level 1

|above = Above

|image     = Image
|imageleft = Imageleft

|group1 = Group 1 - LeveL 1 odd
|list1  = List 1 -Level 1 odd

|group2 = Group 2 - LeveL 1 even
|list2  = List 2 - Level 1 even

|group3 = Group 3 - LeveL 1 odd
|list3  = {{Navbox with collapsible groups

     |title = Group 3 - Title - LeveL 2

     |group1 = Group 3.1 - LeveL 2 odd
     |list1  = List 3.1 - LeveL 2 odd

     |group2 = Group 3.2 - LeveL 2 even
     |list2  = List 3.2 - LeveL 2 even

     |group3 = Group 3.3 - LeveL 2 odd
     |list3  = {{Navbox with collapsible groups

          |title = Group 3.3 - Title - LeveL 3

          |group1 = Group 3.3.1 - LeveL 3 odd
          |list1  = List 3.3.1 - LeveL 3 odd

          |group2 = Group 3.3.2 - LeveL 3 even
          |list2  = List 3.3.2 - LeveL 3 even

          |group3 =
          |list3  = List 3.3.3 - LeveL 3 odd

          |group4 = Group 3.3.4 - LeveL 3 even
          |list4  =

|group4 =
|list4  = List 4 - Level 1 even

|group5 = Group 5 - Level 1 odd
|list5  =

|group6 = Group 6 - Level 1 even
|list6  =

|group7 =
|list7  = List 7 - Level 1 odd

|below = below
produces the following table

The above text is transcluded from Template:Navbox with collapsible groups/doc.
You can change it or view its history. (How does this work?)
If you're done making changes, please refresh the text. (Why?)
You can experiment in this template's Sandbox (create | Mirror ) and Testcases (create) pages.
Please add categories and interwikis to Template:Navbox with collapsible groups/doc. (View all subpages of this page.)
Community content is available under CC-BY-SA unless otherwise noted.