This template produces a navigational template that has groups of relevant articles on a certain topic.
|
This template employs intricate features of template syntax. You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. Remember that you can conduct experiments, and should test all improvements, in either the general Template sandbox or your user space before changing anything here. |
|
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 10 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 = |selected = {{{1|}}} |title = |titlestyle = |groupstyle = |image = |group1 = |abbr1 = |list1 = |group2 = |abbr2 = |list2 = ... |group10 = |abbr10 = |list10 = }}
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.
autocollapse, uncollapsed, collapsed, plain, off
]plain
, off
, and the default value of blank. See {{Navbox}} for more information.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.border = child
parameter set. If this is done, leave the corresponding groupn blank, as the child navbox will already provide the collapsible feature.selected
parameter below to see how to use this parameter. This parameter is optional, but recommended.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.autocollapse, uncollapsed, collapsed, plain, off
]selected
equals abbrn
.background:color
. The color of wikilink text must be manually changed using span tags. For example use title = [[Scouting|Scouting]]
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;
groupstyle = background:lightgreen;
{{Navbox with collapsible groups |name = University of Michigan |title = [[University of Michigan|The University of Michigan, Ann Arbor]] |titlestyle = background:#00008B;color:#FFD700; |groupstyle = background:#FFD700;color:#00008B; |image = |selected = {{{1|}}} |state = collapsed |group1 = [[University of Michigan#Academic profile|Academics]] |abbr1 = academics |list1 = [[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]]{{·}} [[Gerald R. Ford School of Public Policy]]{{·}} [[University of Michigan Law School|Law School]]{{·}} [[University of Michigan Health System|Medical School]]{{·}} [[Ross School of Business]]{{·}} [[University of Michigan School of Education|School of Education]]{{·}} [[University of Michigan School of Information|School of Information]]{{·}} [[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]]{{·}} [[University of Michigan School of Public Health|School of Public Health]]{{·}} [[Taubman College of Architecture and Urban Planning]] |group2 = [[Michigan Wolverines|Athletics]] |abbr2 = athletics |list2 = [[Michigan Stadium|Michigan Stadium]]{{·}} [[Crisler Arena|Crisler Arena]]{{·}} [[Yost Ice Arena|Yost Ice Arena]]{{·}} [[Michigan Wolverines|Michigan Wolverines]]{{·}} [[Michigan Wolverines football|Football]]{{·}} [[Michigan-Ohio State rivalry|UM-OSU Rivalry]]{{·}} [[Little Brown Jug (football)|Little Brown Jug]]{{·}} [[Paul Bunyan Trophy]]{{·}} [[Cold War (ice hockey)|Cold War]] |group3 = Campus |abbr3 = campus |list3 = [[Angell Hall Observatory]]{{·}} [[Burton Tower]]{{·}} [[The Diag]]{{·}} [[David M. Dennison Building|Dennison Building]]{{·}} [[Gerald R. Ford Presidential Library]]{{·}} [[Hill Auditorium|Hill Auditorium]]{{·}} [[Lurie Tower]]{{·}} [[Matthaei Botanical Gardens]]{{·}} [[Michigan Union]]{{·}} [[Museums at the University of Michigan|Museums]]{{·}} [[Nichols Arboretum]]{{·}} [[University of Michigan Health System|UM Health System]]{{·}} [[University of Michigan Library|University Library]] }}
|
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
|
{{Navbox}} - Basic navbox.
{{Navbox}}.
collapsible | Header color | Image | Groups | Style (body) parameter/s | Examples | |
---|---|---|---|---|---|---|
{{Navbox}} | ފަންވަތް:Yes2 collapsible | navbox | ފަންވަތް:Yes2 Left/right of body | Yes | Yes | {{USCongress}} · {{Solar System}} |
ފަންވަތް:Yes2 collapsible | navbox | ފަންވަތް:Yes2 Left/right of columns | No | Yes | {{Current U.S. Senators}} · {{Czech lands}} | |
{{NavboxYears}} | ފަންވަތް:Yes2 collapsible | navbox | No | No | No | {{Wimbledon tournaments}} |
ފަންވަތް:Yes2 collapsible | navbox | ފަންވަތް:Yes2 Left/right of body and/or in each list | Yes | Yes | {{University of Michigan}} · {{Scouting}} |
Type | CSS classes | Javascript | Collapses when | Custom initial state | Nesting |
---|---|---|---|---|---|
Collapsible tables | collapsible | Defined in Common.js | 2 or more autocollapse on page | Yes | Yes |
The above documentation is transcluded from ފަންވަތް:Navbox with collapsible groups/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |