Difference between revisions of "Template:Navbox with collapsible groups/doc"

From NSV13
Jump to navigationJump to search
m (1 revision imported: Navbox machine go brrr)
m (I never want to hear a word about the University of Michigan, Ann Arbor, again.)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
{{High-risk| 109000 }}
 
{{lua|Module:Navbox with collapsible groups}}
 
 
<includeonly>{{Template display|nomobile}}</includeonly>
 
<includeonly>{{Template display|nomobile}}</includeonly>
 
{{Navbox suite}}
 
{{Navbox suite}}
Line 75: Line 73:
  
 
:; ''list<sub>n</sub>''<sup>†</sup>
 
:; ''list<sub>n</sub>''<sup>†</sup>
:: The content/wikilinks that will be shown in the group. {{strikethrough|Use dots or bullets as separators (see the [[#See also|See also]] section).}}  A {{tl|Navbox}} or {{tl|Navbox with columns}} can optionally be used here with its <code>border = child</code> parameter set.  If this is done, leave the corresponding group<sub>n</sub> blank, as the child navbox will already provide the collapsible feature.
+
:: The content/wikilinks that will be shown in the group. A {{tl|Navbox}} or [[w:Template:Navbox with columns]] can optionally be used here with its <code>border = child</code> parameter set.  If this is done, leave the corresponding group<sub>n</sub> blank, as the child navbox will already provide the collapsible feature.
  
 
:; ''abbr<sub>n</sub>''
 
:; ''abbr<sub>n</sub>''
Line 83: Line 81:
 
:: If the value of <code>selected</code> equals the value of <code>abbr<sub>n</sub></code>, then list<sub>n</sub> is uncollapsed and all other lists are collapsed.  If <code>selected</code> is left blank, or if it does not match any <code>abbr<sub>n</sub></code>, then all groups are collapsed.  Usually this parameter should be set to <code><nowiki>{{{1|}}}</nowiki></code>. 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.
 
:: If the value of <code>selected</code> equals the value of <code>abbr<sub>n</sub></code>, then list<sub>n</sub> is uncollapsed and all other lists are collapsed.  If <code>selected</code> is left blank, or if it does not match any <code>abbr<sub>n</sub></code>, then all groups are collapsed.  Usually this parameter should be set to <code><nowiki>{{{1|}}}</nowiki></code>. 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.
  
:: The collapsed/uncollapsed options can be listed on the template's page by using the {{tl|Collapsible sections option}} template in the <nowiki><noinclude></nowiki> part of the page.
+
:: The collapsed/uncollapsed options can be listed on the template's page by using the [[w:Template:Collapsible sections option]] template in the <nowiki><noinclude></nowiki> part of the page.
  
 
:; ''state<sub>n</sub>'' <span style="font-weight:normal;">[<code>uncollapsed, collapsed, plain, off</code>]</span>
 
:; ''state<sub>n</sub>'' <span style="font-weight:normal;">[<code>uncollapsed, collapsed, plain, off</code>]</span>
Line 146: Line 144:
 
   |name = University of Michigan
 
   |name = University of Michigan
 
   |state = uncollapsed
 
   |state = uncollapsed
   |title = [[University of Michigan|<span style="color:#FFD700;">The University of Michigan, Ann Arbor</span>]]
+
   |title = [[w:University of Michigan|<span style="color:#FFD700;">The University of Michigan, Ann Arbor</span>]]
 
   |titlestyle = background:#00008B;color:#FFD700;
 
   |titlestyle = background:#00008B;color:#FFD700;
 
   |listclass = hlist
 
   |listclass = hlist
Line 153: Line 151:
 
   |selected = {{{1|}}}
 
   |selected = {{{1|}}}
 
    
 
    
   |group1 = [[University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]]
+
   |group1 = [[w:University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]]
 
   |abbr1 = academics
 
   |abbr1 = academics
 
   |list1 =
 
   |list1 =
   * [[University of Michigan College of Engineering|College of Engineering]]
+
   * [[w:University of Michigan College of Engineering|College of Engineering]]
   * [[University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]
+
   * [[w:University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]
   * [[Gerald R. Ford School of Public Policy]]
+
   * [[w:Gerald R. Ford School of Public Policy]]
   * [[University of Michigan Law School|Law School]]
+
   * [[w:University of Michigan Law School|Law School]]
   * [[University of Michigan Health System|Medical School]]
+
   * [[w:University of Michigan Health System|Medical School]]
   * [[Ross School of Business]]
+
   * [[w:Ross School of Business]]
   * [[University of Michigan School of Education|School of Education]]
+
   * [[w:University of Michigan School of Education|School of Education]]
   * [[University of Michigan School of Information|School of Information]]
+
   * [[w:University of Michigan School of Information|School of Information]]
   * [[University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]
+
   * [[w:University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]
   * [[University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]
+
   * [[w:University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]
   * [[University of Michigan School of Public Health|School of Public Health]]
+
   * [[w:University of Michigan School of Public Health|School of Public Health]]
   * [[Taubman College of Architecture and Urban Planning]]
+
   * [[w:Taubman College of Architecture and Urban Planning]]
 
    
 
    
   |group2 = [[Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
+
   |group2 = [[w:Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
 
   |abbr2 = athletics
 
   |abbr2 = athletics
 
   |state2 = uncollapsed
 
   |state2 = uncollapsed
 
   |list2 =
 
   |list2 =
   * [[Michigan Stadium]]
+
   * [[w:Michigan Stadium]]
   * [[Crisler Arena]]
+
   * [[w:Crisler Arena]]
   * [[Yost Ice Arena]]
+
   * [[w:Yost Ice Arena]]
   * [[Michigan Wolverines]]
+
   * [[w:Michigan Wolverines]]
   * [[Michigan Wolverines football|Football]]
+
   * [[w:Michigan Wolverines football|Football]]
   * [[Michigan – Ohio State football rivalry|UM-OSU Rivalry]]
+
   * [[w:Michigan – Ohio State football rivalry|UM-OSU Rivalry]]
   * [[Little Brown Jug (American football)|Little Brown Jug]]
+
   * [[w:Little Brown Jug (American football)|Little Brown Jug]]
   * [[Paul Bunyan Trophy]]
+
   * [[w:Paul Bunyan Trophy]]
   * [[Cold War (ice hockey)|Cold War]]
+
   * [[w:Cold War (ice hockey)|Cold War]]
 
    
 
    
 
   |group3 = Campus
 
   |group3 = Campus
 
   |abbr3 = campus
 
   |abbr3 = campus
 
   |list3 =
 
   |list3 =
   * [[Angell Hall Observatory]]
+
   * [[w:Angell Hall Observatory]]
   * [[Burton Memorial Tower|Burton Tower]]
+
   * [[w:Burton Memorial Tower|Burton Tower]]
   * [[The Diag]]
+
   * [[w:The Diag]]
   * [[David M. Dennison Building|Dennison Building]]
+
   * [[w:David M. Dennison Building|Dennison Building]]
   * [[Gerald R. Ford Presidential Library]]
+
   * [[w:Gerald R. Ford Presidential Library]]
   * [[Hill Auditorium]]
+
   * [[w:Hill Auditorium]]
   * [[Lurie Tower]]
+
   * [[w:Lurie Tower]]
   * [[Matthaei Botanical Gardens]]
+
   * [[w:Matthaei Botanical Gardens]]
   * [[Michigan Union]]
+
   * [[w:Michigan Union]]
   * [[Museums at the University of Michigan|Museums]]
+
   * [[w:Museums at the University of Michigan|Museums]]
   * [[Nichols Arboretum]]
+
   * [[w:Nichols Arboretum]]
   * [[University of Michigan Health System|UM Health System]]
+
   * [[w:University of Michigan Health System|UM Health System]]
   * [[University of Michigan Library|University Library]]
+
   * [[w:University of Michigan Library|University Library]]
 
   }}
 
   }}
 
</syntaxhighlight>
 
</syntaxhighlight>
Line 211: Line 209:
 
|selected = {{{1|}}}
 
|selected = {{{1|}}}
  
|group1 = [[University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]]
+
|group1 = [[w:University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]]
 
|abbr1 = academics
 
|abbr1 = academics
 
|list1 =
 
|list1 =
* [[University of Michigan College of Engineering|College of Engineering]]
+
* [[w:University of Michigan College of Engineering|College of Engineering]]
* [[University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]
+
* [[w:University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]
* [[Gerald R. Ford School of Public Policy]]
+
* [[w:Gerald R. Ford School of Public Policy]]
* [[University of Michigan Law School|Law School]]
+
* [[w:University of Michigan Law School|Law School]]
* [[University of Michigan Health System|Medical School]]
+
* [[w:University of Michigan Health System|Medical School]]
* [[Ross School of Business]]
+
* [[w:Ross School of Business]]
* [[University of Michigan School of Education|School of Education]]
+
* [[w:University of Michigan School of Education|School of Education]]
* [[University of Michigan School of Information|School of Information]]
+
* [[w:University of Michigan School of Information|School of Information]]
* [[University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]
+
* [[w:University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]
* [[University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]
+
* [[w:University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]
* [[University of Michigan School of Public Health|School of Public Health]]
+
* [[w:University of Michigan School of Public Health|School of Public Health]]
* [[Taubman College of Architecture and Urban Planning]]
+
* [[w:Taubman College of Architecture and Urban Planning]]
  
|group2 = [[Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
+
|group2 = [[w:Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
 
|abbr2 = athletics
 
|abbr2 = athletics
 
|state2 = uncollapsed
 
|state2 = uncollapsed
 
|list2 =
 
|list2 =
* [[Michigan Stadium]]
+
* [[w:Michigan Stadium]]
* [[Crisler Arena]]
+
* [[w:Crisler Arena]]
* [[Yost Ice Arena]]
+
* [[w:Yost Ice Arena]]
* [[Michigan Wolverines]]
+
* [[w:Michigan Wolverines]]
* [[Michigan Wolverines football|Football]]
+
* [[w:Michigan Wolverines football|Football]]
* [[Michigan – Ohio State football rivalry|UM-OSU Rivalry]]
+
* [[w:Michigan – Ohio State football rivalry|UM-OSU Rivalry]]
* [[Little Brown Jug (American football)|Little Brown Jug]]
+
* [[w:Little Brown Jug (American football)|Little Brown Jug]]
* [[Paul Bunyan Trophy]]
+
* [[w:Paul Bunyan Trophy]]
* [[Cold War (ice hockey)|Cold War]]
+
* [[w:Cold War (ice hockey)|Cold War]]
  
 
|group3 = Campus
 
|group3 = Campus
 
|abbr3 = campus
 
|abbr3 = campus
 
|list3 =
 
|list3 =
* [[Angell Hall Observatory]]
+
* [[w:Angell Hall Observatory]]
* [[Burton Memorial Tower|Burton Tower]]
+
* [[w:Burton Memorial Tower|Burton Tower]]
* [[The Diag]]
+
* [[w:The Diag]]
* [[David M. Dennison Building|Dennison Building]]
+
* [[w:David M. Dennison Building|Dennison Building]]
* [[Gerald R. Ford Presidential Library]]
+
* [[w:Gerald R. Ford Presidential Library]]
* [[Hill Auditorium]]
+
* [[w:Hill Auditorium]]
* [[Lurie Tower]]
+
* [[w:Lurie Tower]]
* [[Matthaei Botanical Gardens]]
+
* [[w:Matthaei Botanical Gardens]]
* [[Michigan Union]]
+
* [[w:Michigan Union]]
* [[Museums at the University of Michigan|Museums]]
+
* [[w:Museums at the University of Michigan|Museums]]
* [[Nichols Arboretum]]
+
* [[w:Nichols Arboretum]]
* [[University of Michigan Health System|UM Health System]]
+
* [[w:University of Michigan Health System|UM Health System]]
* [[University of Michigan Library|University Library]]
+
* [[w:University of Michigan Library|University Library]]
 
}}
 
}}
  
 
===Nesting other Navbox forms===
 
===Nesting other Navbox forms===
This example shows {{tl|Navbox}}, {{tl|Navbox with collapsible groups}} and {{tl|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 <code>child</code>
+
This example shows {{tl|Navbox}}, [[w:Template:Navbox with collapsible groups]] and [[w:Template: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 <code>child</code>
 
{{Navbox with collapsible groups
 
{{Navbox with collapsible groups
 
|name = Navbox with collapsible groups/doc#Nesting other Navbox forms
 
|name = Navbox with collapsible groups/doc#Nesting other Navbox forms
Line 267: Line 265:
 
|listclass = hlist
 
|listclass = hlist
  
|group1 = [[:Category:Scouting|The Scouting Movement]]
+
|group1 = [[w:Category:Scouting|The Scouting Movement]]
 
|abbr1 = movement
 
|abbr1 = movement
 
|list1 =
 
|list1 =
*[[Scouting]]
+
*[[w:Scouting]]
*''[[Scouting for Boys]]''
+
*''[[w:Scouting for Boys]]''
*[[Scout method]]
+
*[[w:Scout method]]
*[[Scout Law]]
+
*[[w:Scout Law]]
*[[Scout Promise]]
+
*[[w:Scout Promise]]
*[[Scout Motto]]
+
*[[w:Scout Motto]]
*[[Wood Badge]]
+
*[[w:Wood Badge]]
*[[Age groups in Scouting and Guiding]]
+
*[[w:Age groups in Scouting and Guiding]]
*[[Cub Scout]]
+
*[[w:Cub Scout]]
*[[Scout (Scouting)|Boy Scout]]
+
*[[w:Scout (Scouting)|Boy Scout]]
*[[Rover Scout]]
+
*[[w:Rover Scout]]
*[[Brownie (Girl Guides)|Brownie]]
+
*[[w:Brownie (Girl Guides)|Brownie]]
*[[Girl Guiding and Girl Scouting]]
+
*[[w:Girl Guiding and Girl Scouting]]
*[[Ranger (Girl Guide)]]
+
*[[w:Ranger (Girl Guide)]]
*[[Jamboree (Scouting)|Jamboree]]
+
*[[w:Jamboree (Scouting)|Jamboree]]
*[[Scout Leader]]
+
*[[w:Scout Leader]]
*[[World Organization of the Scout Movement|WOSM]]
+
*[[w:World Organization of the Scout Movement|WOSM]]
*[[World Association of Girl Guides and Girl Scouts|WAGGGS]]
+
*[[w:World Association of Girl Guides and Girl Scouts|WAGGGS]]
*[[Non-aligned Scouting and Scout-like organisations|Non-aligned organisations]]
+
*[[w:Non-aligned Scouting and Scout-like organisations|Non-aligned organisations]]
*[[Scouting controversy and conflict]]
+
*[[w:Scouting controversy and conflict]]
*[[Scouting in popular culture]]
+
*[[w:Scouting in popular culture]]
*[[List of Scouts]]
+
*[[w:List of Scouts]]
*[[List of highest awards in Scouting]]
+
*[[w:List of highest awards in Scouting]]
  
 
|list2 = {{Navbox|child
 
|list2 = {{Navbox|child
|title      = [[French colonial empire|Former French colonies]] in [[Africa]] and the [[Indian Ocean]]
+
|title      = [[w:French colonial empire|Former French colonies]] in [[w:Africa]] and the [[w:Indian Ocean]]
 
|state      = {{#ifeq:{{{1|}}}|french|uncollapsed|collapsed}}
 
|state      = {{#ifeq:{{{1|}}}|french|uncollapsed|collapsed}}
 
|titlestyle = background#
 
|titlestyle = background#
 
|groupstyle = background:lavender;
 
|groupstyle = background:lavender;
  
|group1 = [[Maghreb|Mahgreb]]
+
|group1 = [[w:Maghreb|Mahgreb]]
 
|list1  =
 
|list1  =
*[[French Algeria|Algeria]]
+
*[[w:French Algeria|Algeria]]
*[[French protectorate of Morocco|Morocco]]&nbsp;<small>([[Arguin|Arguin Island]])</small>
+
*[[w:French protectorate of Morocco|Morocco]]&nbsp;<small>([[w:Arguin|Arguin Island]])</small>
*[[History of Tunisia|Tunisia]]
+
*[[w:History of Tunisia|Tunisia]]
  
|group2 = [[French West Africa]]
+
|group2 = [[w:French West Africa]]
 
|list2  =
 
|list2  =
*[[History of Côte d'Ivoire#French Period|Côte d'Ivoire]]
+
*[[w:History of Côte d'Ivoire#French Period|Côte d'Ivoire]]
*[[French Dahomey|Dahomey]]
+
*[[w:French Dahomey|Dahomey]]
*[[French Sudan]]
+
*[[w:French Sudan]]
*[[French Guinea|Guinea]]
+
*[[w:French Guinea|Guinea]]
*[[History of Mauritania#French colonization and post-colonial history|Mauritania]]
+
*[[w:History of Mauritania#French colonization and post-colonial history|Mauritania]]
*[[History of Niger#Colonization|Niger]]
+
*[[w:History of Niger#Colonization|Niger]]
*[[History of Senegal|Senegal]]
+
*[[w:History of Senegal|Senegal]]
*[[French Upper Volta|Upper Volta]]
+
*[[w:French Upper Volta|Upper Volta]]
  
 
|group3 = &nbsp;
 
|group3 = &nbsp;
 
|list3  =
 
|list3  =
*[[French Togoland]]
+
*[[w:French Togoland]]
*[[James Island (Gambia)|James Island]]
+
*[[w:James Island (Gambia)|James Island]]
  
|group4 = [[French Equatorial Africa]]
+
|group4 = [[w:French Equatorial Africa]]
 
|list4  =
 
|list4  =
*[[Colonial Chad|Chad]]
+
*[[w:Colonial Chad|Chad]]
*[[History of Gabon|Gabon]]
+
*[[w:History of Gabon|Gabon]]
*[[History of the Republic of the Congo|Middle Congo]]
+
*[[w:History of the Republic of the Congo|Middle Congo]]
*[[Ubangi-Shari|Oubangui-Chari]]
+
*[[w:Ubangi-Shari|Oubangui-Chari]]
  
|group5 = [[Comoros]]
+
|group5 = [[w:Comoros]]
 
|list5  =
 
|list5  =
*[[Anjouan]]
+
*[[w:Anjouan]]
*[[Grande Comore]]
+
*[[w:Grande Comore]]
*[[Mohéli]]
+
*[[w:Mohéli]]
  
 
|group6 = &nbsp;
 
|group6 = &nbsp;
 
|list6  =
 
|list6  =
*[[History of Djibouti#French interest|French Somaliland (Djibouti)]]
+
*[[w:History of Djibouti#French interest|French Somaliland (Djibouti)]]
*[[History of Madagascar#French control|Madagascar]]
+
*[[w:History of Madagascar#French control|Madagascar]]
*[[Mauritius|Ile de France]]
+
*[[w:Mauritius|Ile de France]]
*[[Seychelles]]
+
*[[w:Seychelles]]
  
 
}}
 
}}
  
|group3 = [[:Category:Scouting and Guiding in the United Kingdom|Scouting and Guiding in the United Kingdom]]
+
|group3 = [[w:Category:Scouting and Guiding in the United Kingdom|Scouting and Guiding in the United Kingdom]]
 
|abbr3 = Scouting
 
|abbr3 = Scouting
 
|list3 =
 
|list3 =
*[[The Scout Association]]
+
*[[w:The Scout Association]]
*[[Girlguiding UK]]
+
*[[w:Girlguiding UK]]
*[[Beaver Scouts]]
+
*[[w:Beaver Scouts]]
*[[Cub Scouts (The Scout Association)|Cub Section (UK)]]
+
*[[w:Cub Scouts (The Scout Association)|Cub Section (UK)]]
*[[Venture Scout]]
+
*[[W:Venture Scout]]
*[[Explorer Scouts (The Scout Association)|Explorer Scouts]]
+
*[[w:Explorer Scouts (The Scout Association)|Explorer Scouts]]
*[[Brownie (Girl Guides)]]
+
*[[w:Brownie (Girl Guides)]]
*[[Ranger (Girl Guide)]]
+
*[[w:Ranger (Girl Guide)]]
*[[Rainbow (Girl Guides)]]
+
*[[w:Rainbow (Girl Guides)]]
*[[Scout Network]]
+
*[[w:Scout Network]]
*[[Chief Scout (The Scout Association)|Chief Scout (United Kingdom)]]
+
*[[w:Chief Scout (The Scout Association)|Chief Scout (United Kingdom)]]
*[[Scout Counties (The Scout Association)|Scout Counties]]
+
*[[w:Scout Counties (The Scout Association)|Scout Counties]]
*[[Scout District]]
+
*[[w:Scout District]]
*[[Scouts (The Scout Association)|Scout Section (UK)]]
+
*[[w:Scouts (The Scout Association)|Scout Section (UK)]]
*[[Scout Activity Centre (The Scout Association)|Scout Activity Centre]]
+
*[[w:Scout Activity Centre (The Scout Association)|Scout Activity Centre]]
*[[Young Leaders (The Scout Association)|Young Leaders]]
+
*[[w:Young Leaders (The Scout Association)|Young Leaders]]
  
 
|list4 = {{Navbox with columns|child
 
|list4 = {{Navbox with columns|child
Line 483: Line 481:
  
 
== See also ==
 
== See also ==
* {{tl|Navboxes}} (and {{tl|Navboxes top}})
+
* [[w:Template:Navboxes|Template:Navboxes]] (and [[w:Navboxes top|Template:Navboxes top]])
* {{tl|Collapsible sections option}}
+
* [[w:Template:Collapsible sections option|Template: Collapsible section option]]
* {{strikethrough|{{tl|Nowrap begin}} – Provides an explanation of the preferred method of using bullets or pipes to delimit list items.}} Deprecated; use the <code>hlist</code> class.
 
{{Navigation templates}}
 
  
 
<includeonly>{{Sandbox other||
 
<includeonly>{{Sandbox other||

Revision as of 16:52, 20 May 2021

Template:Navbox suite

This template produces a navigation 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.

Usage

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

{{Navbox with collapsible groups
| name = {{subst:PAGENAME}}
| state = {{{state|}}}
| titlestyle = 
| title = 
| image = 
| listclass = hlist
| selected = {{{selected|{{{1|}}}}}}

| abbr1 = 
| group1 = 
| list1 = 

| abbr2 = 
| group2 = 
| list2 = 

<!--[etc, to:]-->

| abbr20 = 
| group20 = 
| list20 = 
}}

Parameters

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

name
The name of the template. The name of this template, for example, is "Navbox with collapsible groups".
state [uncollapsed, 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.
navbar
Possible values are plain, off, and the default value of blank. See {{Navbox}} for more information.
border
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

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
Image to the right of all of the groups/lists.
imageleft
Image to the left of all of the groups/lists.
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. A {{Navbox}} or w:Template: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.
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. 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.
The collapsed/uncollapsed options can be listed on the template's page by using the w:Template:Collapsible sections option template in the <noinclude> part of the page.
staten [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.
imageleftn
An image to appear in the listn content area on the left side.

Style parameters

bodystyle
CSS style/s to apply to the entire template
titlestyle
CSS 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:
titlestyle = background:darkgreen;color:ivory;
abovestyle
belowstyle
CSS style/s to apply to the above and below parameters, respectively.
basestyle
CSS style/s to apply to the title, above, below, and groupn parameters, all at the same time.
imagestyle
CSS style/s to apply to the image parameter. Does not get applied to the imagen parameters.
imageleftstyle
CSS style/s to apply to the imageleft parameter. Does not get applied to the imageleftn parameters.
groupstyle
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;
groupnstyle
CSS style/s to apply to a specific group heading; overrides any CSS styles set in groupstyle.
liststyle
CSS style/s to apply to all list content parameters.
listnstyle
CSS style/s to apply to specific list content parameters; overrides any CSS styles set in liststyle.
listpadding
Padding to have in each list cell; defaults to 0.25em on the left/right and 0em on the top/bottom.

Microformat parameters

bodyclass
This parameter is inserted into the "class" attribute for the infobox as a whole.
titleclass
This parameter is inserted into the "class" attribute for the infobox's title caption.
See Wikipedia:WikiProject Microformats for more information on adding microformat information to Wikipedia, and microformat for more information on microformats in general.

Examples

Basic example

  {{Navbox with collapsible groups
  |name = University of Michigan
  |state = uncollapsed
  |title = [[w:University of Michigan|<span style="color:#FFD700;">The University of Michigan, Ann Arbor</span>]]
  |titlestyle = background:#00008B;color:#FFD700;
  |listclass = hlist
  |groupstyle = background:#FFD700;color:#00008B;
  |image = 
  |selected = {{{1|}}}
  
  |group1 = [[w:University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]]
  |abbr1 = academics
  |list1 =
  * [[w:University of Michigan College of Engineering|College of Engineering]]
  * [[w:University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]
  * [[w:Gerald R. Ford School of Public Policy]]
  * [[w:University of Michigan Law School|Law School]]
  * [[w:University of Michigan Health System|Medical School]]
  * [[w:Ross School of Business]]
  * [[w:University of Michigan School of Education|School of Education]]
  * [[w:University of Michigan School of Information|School of Information]]
  * [[w:University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]
  * [[w:University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]
  * [[w:University of Michigan School of Public Health|School of Public Health]]
  * [[w:Taubman College of Architecture and Urban Planning]]
  
  |group2 = [[w:Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
  |abbr2 = athletics
  |state2 = uncollapsed
  |list2 =
  * [[w:Michigan Stadium]]
  * [[w:Crisler Arena]]
  * [[w:Yost Ice Arena]]
  * [[w:Michigan Wolverines]]
  * [[w:Michigan Wolverines football|Football]]
  * [[w:Michigan – Ohio State football rivalry|UM-OSU Rivalry]]
  * [[w:Little Brown Jug (American football)|Little Brown Jug]]
  * [[w:Paul Bunyan Trophy]]
  * [[w:Cold War (ice hockey)|Cold War]]
  
  |group3 = Campus
  |abbr3 = campus
  |list3 =
  * [[w:Angell Hall Observatory]]
  * [[w:Burton Memorial Tower|Burton Tower]]
  * [[w:The Diag]]
  * [[w:David M. Dennison Building|Dennison Building]]
  * [[w:Gerald R. Ford Presidential Library]]
  * [[w:Hill Auditorium]]
  * [[w:Lurie Tower]]
  * [[w:Matthaei Botanical Gardens]]
  * [[w:Michigan Union]]
  * [[w:Museums at the University of Michigan|Museums]]
  * [[w:Nichols Arboretum]]
  * [[w:University of Michigan Health System|UM Health System]]
  * [[w:University of Michigan Library|University Library]]
  }}

Nesting other Navbox forms

This example shows {{Navbox}}, w:Template:Navbox with collapsible groups and w:Template: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

Nesting Navboxes to get more groups/lists

You can conveniently nest Navboxes, including {{Navbox with collapsible groups}}, to get an unlimited number of groups/lists. The following example uses one instance of {{Navbox with collapsible groups}} to get the first 10 collapsible groups, a nested instance to get the next 10, and another nested instance to get the last 6. See the code to learn how it works. It is fairly simple to extend this to as many groups/lists as you like:

See also