https://nordiclarp.org/w/index.php?title=Template:Navbox_subgroup/doc&feed=atom&action=historyTemplate:Navbox subgroup/doc - Revision history2024-03-28T20:33:46ZRevision history for this page on the wikiMediaWiki 1.34.2https://nordiclarp.org/w/index.php?title=Template:Navbox_subgroup/doc&diff=16522&oldid=prevJohannes Axner: 1 revision imported2019-01-03T05:19:18Z<p>1 revision imported</p>
<table class="diff diff-contentalign-left" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #222; text-align: center;">Revision as of 05:19, 3 January 2019</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>Johannes Axnerhttps://nordiclarp.org/w/index.php?title=Template:Navbox_subgroup/doc&diff=16521&oldid=preven>Frietjes: update until this template can be rewritten to use Module:Navbox directly2017-12-05T15:25:44Z<p>update until this template can be rewritten to use <a href="/wiki/Module:Navbox" title="Module:Navbox">Module:Navbox</a> directly</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
{{Intricate template}}<br />
{{Template display|nomobile}}<br />
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --><br />
{{Navbox suite}}<br />
{{Deprecated template|Navbox subgroup|Navbox|note={{tld|Navbox subgroup}} is functionally equivalent to {{tld|Navbox|subgroup}}, but the later is more efficient (since it doesn't use an additional template layer) and allows for more than 20 list items.}}<br />
This template was designed to be used with {{tl|Navbox}} or other [[Wikipedia:Navigation template|navigation template]]s that allow creating lists of links with groups headers or titles. This template allows for the creation of up to 20 subgroups that can be assigned to a list item within {{tl|Navbox}}. For 20 subgroups or fewer, this template is functionally equivalent to {{tld|Navbox|subgroup}}, but is less efficient since it uses an additional template layer. Hence, it is recommended to use {{tld|Navbox|subgroup}} instead.<br />
<br />
== Blank template ==<br />
<pre><br />
{{Navbox subgroup<br />
| groupstyle = <br />
| liststyle = <br />
<br />
| group1 = <br />
| list1 = <br />
| group2 = <br />
| list2 = <br />
...<br />
| group20 = <br />
| list20 = <br />
}}<br />
</pre><br />
<br />
== Parameters ==<br />
This template employs all parameters of {{tl|Navbox}}. Please see the documentation there for more complete descriptions. In fact, the only differences between this template and {{tl|Navbox}} are as follows:<br />
*The border parameter defaults to "child"<br />
*The group padding defaults to 0.75em on the left/right, and can only be changed with the <code>grouppadding</code> parameter. This is done to prevent the [[Internet Explorer box model bug]] from affecting the width of groups.<br />
Everything else is ''exactly'' the same as {{tl|Navbox}}.<br />
<br />
Only the most common parameters are listed below.<br />
<br />
=== Cells ===<br />
:; ''list<sub>n</sub>''<br />
:: (i.e. ''list1'', ''list2'', ... ''list20'') The body of the template, usually a list of links. Format is inline. At least one ''list'' parameter is required; each additional ''list'' is displayed in a separate row of the table. Each ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below). <br />
<br />
:; ''group<sub>n</sub>''<br />
:: (i.e. ''group1'', ''group2'', ..., ''group20'') If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table. The background color defaults to <code><span style="background:#e6e6ff; color:black;">#e6e6ff</span></code>, but can be changed via the ''groupstyle'' parameter (see below).<br />
<br />
=== Styles ===<br />
:; ''bodystyle''<br />
:: Specifies [[Cascading Style Sheets|CSS]] styles to apply to the template body. Examples:<br />
::: <code>background:#''nnnnnn'';</code><br />
::: <code>text-align:[''right/center/left/justified''];</code><br />
<br />
:; ''groupstyle''<br />
:: CSS styles to apply to the ''group<sub>n</sub>'' cells. This option overrides any styles that are applied to the entire table. Examples:<br />
::: <code>background:#''nnnnnn'';</code><br />
::: <code>text-align:[''left/center/right''];</code><br />
::: <code>vertical-align:[''top/middle/bottom''];</code><br />
::: <code>white-space:nowrap;</code><br />
<br />
:; ''grouppadding''<br />
:: CSS style to specify group padding. Should usually be specified using em units. It is recommended to leave this parameter alone and use the default padding. Examples:<br />
::: <code>grouppadding = 0em 1em;</code> (1em on left/right, 0em on top/bottom)<br />
::: <code>grouppadding = 0em 0.5em 0em 1em;</code> (0em top, 0.5em right, 0em bottom, 1em left)<br />
<br />
:; ''liststyle''<br />
:: CSS styles to apply to all lists. Overridden by the ''oddstyle'' and ''evenstyle'' parameters (if specified) below.<br />
<br />
:; ''oddstyle''<br />
:; ''evenstyle''<br />
:: CSS styles to apply to the odd-numbered list items (''list1'', ''list3'', etc) or even-numbered list items (''list2'', ''list4'', etc), respectively. Typically used to set background color (<code>background:#''nnnnnn'';</code>) in order to achieve an alternating background color between odd and even-numbered lists.<br />
<br />
:; ''evenodd'' <span style="font-weight:normal;"><code>[swap, even, odd, off]</code></span><br />
:: If set to <code>swap</code>, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to <code>even</code> or <code>odd</code> sets all rows to have that striping color. Setting to <code>off</code> disables automatic row striping. NOTE: Due to system limitations, do '''not''' use a semi-colon to close this command. <br />
<br />
==Setting the width of groups==<br />
If multiple {{tl|Navbox subgroup}} templates are used inside of a parent {{tl|Navbox}}, it generally looks better if the width of the groups matches up. In order to do this, one must set the <code>groupwidth</code> parameter:<br />
<br />
:<code>groupwidth = 10em</code><br />
<br />
An alternative way is to set the <code>groupstyle</code> parameters to contain the desired width, and the <code>liststyle</code> parameters to have width:auto (due to HTML/CSS reasons). For example, place the following code in each {{tl|Navbox subgroup}} to adjust the widths:<br />
:<code>groupstyle = width:10em;</code><br />
:<code>liststyle = width:auto;</code><br />
*NOTE: For the <code>groupstyle</code> widths to work, you '''must''' set the <code>liststyle</code> width to "auto".<br />
If you also use the <code>image</code> or <code>imageleft</code> parameters, then you will most likely also need to set their width manually using the <code>imagestyle</code> and <code>imageleftstyle</code> parameters.<br />
<br />
==Example==<br />
The following is an example of ''Navbox subgroup'' used within a ''Navbox'' template.<br />
<br />
{{Navbox<br />
| state = uncollapsed<br />
| name = Navbox subgroup/doc<br />
| title = Protected Areas of Colorado<br />
| listclass = hlist<br />
| group1 = National Park Service<br />
| list1 = {{Navbox subgroup<br />
| group1 = National Parks<br />
| list1 =<br />
*[[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]<br />
*[[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]<br />
*[[Mesa Verde National Park|Mesa Verde]]<br />
*[[Rocky Mountain National Park|Rocky Mountain]]<br />
| group2 = National Monuments<br />
| list2 =<br />
*[[Colorado National Monument|Colorado]]<br />
*[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]<br />
*[[Hovenweep National Monument|Hovenweep]]<br />
*[[Yucca House National Monument|Yucca House]]<br />
| group3 = National Historic Sites<br />
| list3 =<br />
*[[Bent's Old Fort National Historic Site|Bent's Old Fort]]<br />
*[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]<br />
| group4 = National Recreation Area<br />
| list4 =<br />
*[[Curecanti National Recreation Area|Curecanti]]<br />
}}<br />
| group2 = National Forests<br />
| list2 =<br />
*[[Arapaho National Forest|Arapaho]]<br />
*[[Grand Mesa National Forest|Grand Mesa]]<br />
*[[Gunnison National Forest|Gunnison]]<br />
*[[Pike National Forest|Pike]]<br />
*[[Rio Grande National Forest|Rio Grande]]<br />
*[[Roosevelt National Forest|Roosevelt]]<br />
*[[Medicine Bow – Routt National Forest|Medicine Bow – Routt]]<br />
*[[San Isabel National Forest|San Isabel]]<br />
*[[San Juan National Forest|San Juan]]<br />
*[[Uncompahgre National Forest|Uncompahgre]]<br />
*[[White River National Forest|White River]]<br />
}}<br />
<br />
<pre style="overflow:scroll;"><br />
{{Navbox<br />
| state = uncollapsed<br />
| name = Protected Areas of Colorado<br />
| title = Protected Areas of Colorado<br />
| listclass = hlist<br />
| group1 = National Park Service<br />
| list1 = {{Navbox subgroup<br />
| group1 = National Parks<br />
| list1 =<br />
*[[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]<br />
*[[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]<br />
*[[Mesa Verde National Park|Mesa Verde]]<br />
*[[Rocky Mountain National Park|Rocky Mountain]]<br />
| group2 = National Monuments<br />
| list2 =<br />
*[[Colorado National Monument|Colorado]]<br />
*[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]<br />
*[[Hovenweep National Monument|Hovenweep]]<br />
*[[Yucca House National Monument|Yucca House]]<br />
| group3 = National Historic Sites<br />
| list3 =<br />
*[[Bent's Old Fort National Historic Site|Bent's Old Fort]]<br />
*[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]<br />
| group4 = National Recreation Area<br />
| list4 =<br />
*[[Curecanti National Recreation Area|Curecanti]]<br />
}}<br />
| group2 = National Forests<br />
| list2 =<br />
*[[Arapaho National Forest|Arapaho]]<br />
*[[Grand Mesa National Forest|Grand Mesa]]<br />
*[[Gunnison National Forest|Gunnison]]<br />
*[[Pike National Forest|Pike]]<br />
*[[Rio Grande National Forest|Rio Grande]]<br />
*[[Roosevelt National Forest|Roosevelt]]<br />
*[[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]<br />
*[[San Isabel National Forest|San Isabel]]<br />
*[[San Juan National Forest|San Juan]]<br />
*[[Uncompahgre National Forest|Uncompahgre]]<br />
*[[White River National Forest|White River]]<br />
}}<br />
</pre><br />
<br />
== See also ==<br />
* {{tl|Navbox}} – Basic navbox<br />
* {{tl|Navbox with columns}} – Allows columns instead of groups/lists<br />
* {{tl|Navbox with collapsible groups}} – Another variation.<br />
* {{strikethrough|[[Wikipedia:Line-break handling]] – The how-to guide about how to handle word wraps (line breaks) on Wikipedia, such as the wrapping of the link lists used in navboxes.}} Deprecated; use the <code>hlist</code> class.<br />
* {{strikethrough|{{tl|Nowrap begin}} – The recommended format for adding bullets, pipes, or dashes between list items.}} Deprecated; use the <code>hlist</code> class.<br />
* {{tl|Nobold}} – To display text at normal font-weight within a context where the default font-weight is bold, e.g. header cells in tables.<br />
<br />
{{Navigation templates}}<br />
<br />
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||<br />
<!--Categories--><br />
[[Category:Navigational boxes| ]]<br />
[[Category:Wikipedia metatemplates|{{PAGENAME}}]]<br />
}}</includeonly></div>en>Frietjes