Jump to content

Teamplaid:Navbox with collapsible groups/documentation

O Wiktionary

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.

Ùsaid - 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 = 

Paramadairean - 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

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.
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.

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 immediately 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.
The collapsed/uncollapsed options can be listed on the template's page by using the {{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.
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 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 = {{enUici|:w:en: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;
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.

Microformat parameters

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

Eisimpleirean - Examples


Basic example

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

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:

Faic cuideachd - Also see

Teamplaid:Navigation templates