Template:Navbox: Difference between revisions

From DynamicPageList3 Manual
Content added Content deleted
No edit summary
No edit summary
Tag: Manual revert
 
(15 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<onlyinclude><includeonly><!--
{| class="navbox mw-collapsible mw-collapsed" style="background: transparent; text-align: left; border: 1px solid silver; margin-top: 0.2em; width:100%;"
|-
| colspan="3" | <div style="background: #b0e03b; font-size: 120%; font-weight: bold; padding-bottom: 5px; text-align: center;">{{{Header}}}</div>
|-
{{#if:{{{Group1|}}}|
! {{#if:{{{Group1.5|}}}|rowspan="5"|{{#if:{{{Group1.4|}}}|rowspan="4"|{{#if:{{{Group1.3|}}}|rowspan="3"|{{#if:{{{Group1.2|}}}|rowspan="2"| }} }} }} }} {{!}} '''{{{Group1}}}'''
{{#if:{{{Group1.1|}}}|
! {{{Group1.1}}} }} }}
| {{#if:{{{Group1|}}} | {{#if:{{{Group1.1|}}} | | colspan="2" }} | colspan="3" style="text-align: center;" }} | {{{Body1}}}
|-style="background: #ededed;"
{{#if:{{{Group1.2|}}}|
! {{{Group1.2}}}
{{!}} {{{Body1.2}}} }}
|-style="background: #ededed;"
{{#if:{{{Group1.3|}}}|
! {{{Group1.3}}}
{{!}} {{{Body1.3}}} }}
|-style="background: #ededed;"
{{#if:{{{Group1.4|}}}|
! {{{Group1.4}}}
{{!}} {{{Body1.4}}} }}
|-style="background: #ededed;"
{{#if:{{{Group1.5|}}}|
! {{{Group1.5}}}
{{!}} {{{Body1.5}}} }}
|-
{{#if:{{{Group2|}}}| ! {{#if:{{{Group2.5|}}}|rowspan="5"|{{#if:{{{Group2.4|}}}|rowspan="4"|{{#if:{{{Group2.3|}}}|rowspan="3"|{{#if:{{{Group2.2|}}}|rowspan="2"| }} }} }} }} {{!}} '''{{{Group2}}}''' }}
{{#if:{{{Group2.1|}}}|
! {{{Group2.1}}} }}
{{#if:{{{Group2|}}}|
{{!}} {{#if:{{{Group2.1|}}}| |colspan="2"}} {{!}} {{{Body2}}} }}
|-
{{#if:{{{Group2.2|}}}|
! {{{Group2.2}}}
{{!}} {{{Body2.2}}} }}
|-
{{#if:{{{Group2.3|}}}|
! {{{Group2.3}}}
{{!}} {{{Body2.3}}} }}
|-
{{#if:{{{Group2.4|}}}|
! {{{Group2.4}}}
{{!}} {{{Body2.4}}} }}
|-
{{#if:{{{Group2.5|}}}|
! {{{Group2.5}}}
{{!}} {{{Body2.5}}} }}
|-style="background: #ededed;"
{{#if:{{{Group3|}}}| ! {{#if:{{{Group3.5|}}}|rowspan="5"|{{#if:{{{Group3.4|}}}|rowspan="4"|{{#if:{{{Group3.3|}}}|rowspan="3"|{{#if:{{{Group3.2|}}}|rowspan="2"| }} }} }} }} {{!}} '''{{{Group3}}}''' }}
{{#if:{{{Group3.1|}}}|
! {{{Group3.1}}} }}
{{#if:{{{Group3|}}}|
{{!}} {{#if:{{{Group3.1|}}}| |colspan="2"}} {{!}} {{{Body3}}} }}
|-style="background: #ededed;"
{{#if:{{{Group3.2|}}}|
! {{{Group3.2}}}
{{!}} {{{Body3.2}}} }}
|-style="background: #ededed;"
{{#if:{{{Group3.3|}}}|
! {{{Group3.3}}}
{{!}} {{{Body3.3}}} }}
|-style="background: #ededed;"
{{#if:{{{Group3.4|}}}|
! {{{Group3.4}}}
{{!}} {{{Body3.4}}} }}
|-style="background: #ededed;"
{{#if:{{{Group3.5|}}}|
! {{{Group3.5}}}
{{!}} {{{Body3.5}}} }}
|-
{{#if:{{{Group4|}}}| ! {{#if:{{{Group4.5|}}}|rowspan="5"|{{#if:{{{Group4.4|}}}|rowspan="4"|{{#if:{{{Group4.3|}}}|rowspan="3"|{{#if:{{{Group4.2|}}}|rowspan="2"| }} }} }} }} {{!}} '''{{{Group4}}}''' }}
{{#if:{{{Group4.1|}}}|
! {{{Group4.1}}} }}
{{#if:{{{Group4|}}}|
{{!}} {{#if:{{{Group4.1|}}}| |colspan="2"}} {{!}} {{{Body4}}} }}
|-
{{#if:{{{Group4.2|}}}|
! {{{Group4.2}}}
{{!}} {{{Body4.2}}} }}
|-
{{#if:{{{Group4.3|}}}|
! {{{Group4.3}}}
{{!}} {{{Body4.3}}} }}
|-
{{#if:{{{Group4.4|}}}|
! {{{Group4.4}}}
{{!}} {{{Body4.4}}} }}
|-
{{#if:{{{Group4.5|}}}|
! {{{Group4.5}}}
{{!}} {{{Body4.5}}} }}
|-style="background: #ededed;"
{{#if:{{{Group5|}}}| ! {{#if:{{{Group5.5|}}}|rowspan="5"|{{#if:{{{Group5.4|}}}|rowspan="4"|{{#if:{{{Group5.3|}}}|rowspan="3"|{{#if:{{{Group5.2|}}}|rowspan="2"| }} }} }} }} {{!}} '''{{{Group5}}}''' }}
{{#if:{{{Group5.1|}}}|
! {{{Group5.1}}} }}
{{#if:{{{Group5|}}}|
{{!}} {{#if:{{{Group5.1|}}}| |colspan="2"}} {{!}} {{{Body5}}} }}
|-style="background: #ededed;"
{{#if:{{{Group5.2|}}}|
! {{{Group5.2}}}
{{!}} {{{Body5.2}}} }}
|-style="background: #ededed;"
{{#if:{{{Group5.3|}}}|
! {{{Group5.3}}}
{{!}} {{{Body5.3}}} }}
|-style="background: #ededed;"
{{#if:{{{Group5.4|}}}|
! {{{Group5.4}}}
{{!}} {{{Body5.4}}} }}
|-style="background: #ededed;"
{{#if:{{{Group5.5|}}}|
! {{{Group5.5}}}
{{!}} {{{Body5.5}}} }}
|-
{{#if:{{{Group6|}}}| ! {{#if:{{{Group6.5|}}}|rowspan="5"|{{#if:{{{Group6.4|}}}|rowspan="4"|{{#if:{{{Group6.3|}}}|rowspan="3"|{{#if:{{{Group6.2|}}}|rowspan="2"| }} }} }} }} {{!}} '''{{{Group6}}}''' }}
{{#if:{{{Group6.1|}}}|
! {{{Group6.1}}} }}
{{#if:{{{Group6|}}}|
{{!}} {{#if:{{{Group6.1|}}}| |colspan="2"}} {{!}} {{{Body6}}} }}
|-
{{#if:{{{Group6.2|}}}|
! {{{Group6.2}}}
{{!}} {{{Body6.2}}} }}
|-
{{#if:{{{Group6.3|}}}|
! {{{Group6.3}}}
{{!}} {{{Body6.3}}} }}
|-
{{#if:{{{Group6.4|}}}|
! {{{Group6.4}}}
{{!}} {{{Body6.4}}} }}
|-
{{#if:{{{Group6.5|}}}|
! {{{Group6.5}}}
{{!}} {{{Body6.5}}} }}
|-style="background: #ededed;"
{{#if:{{{Group7|}}}| ! {{#if:{{{Group7.5|}}}|rowspan="5"|{{#if:{{{Group7.4|}}}|rowspan="4"|{{#if:{{{Group7.3|}}}|rowspan="3"|{{#if:{{{Group7.2|}}}|rowspan="2"| }} }} }} }} {{!}} '''{{{Group7}}}''' }}
{{#if:{{{Group7.1|}}}|
! {{{Group7.1}}} }}
{{#if:{{{Group7|}}}|
{{!}} {{#if:{{{Group7.1|}}}| |colspan="2"}} {{!}} {{{Body7}}} }}
|-style="background: #ededed;"
{{#if:{{{Group7.2|}}}|
! {{{Group7.2}}}
{{!}} {{{Body7.2}}} }}
|-style="background: #ededed;"
{{#if:{{{Group7.3|}}}|
! {{{Group7.3}}}
{{!}} {{{Body7.3}}} }}
|-style="background: #ededed;"
{{#if:{{{Group7.4|}}}|
! {{{Group7.4}}}
{{!}} {{{Body7.4}}} }}
|-style="background: #ededed;"
{{#if:{{{Group7.5|}}}|
! {{{Group7.5}}}
{{!}} {{{Body7.5}}} }}


Please do not edit without discussion first as this is a VERY complex template.
|}<noinclude>
This template is used to create and generate all navboxes in the wiki. There are a total of 7 possible groups in each navbox, and each group can have five subgroups. It is imperative that the subgroups be used in order or the template will not display properly. Do not jump from Group2.3 to Group2.5 without using the subgroup in-between, as it will cause displaying errors.


--><templatestyles src="Navbox/styles.css" /><!--
BodyX.1 does not exist, this is to allow this template to be backwards compatible with already created navboxes in the wiki. When subheaders are used, BodyX assumes the role as the first body cell under a particular header.
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbox {{{bodyclass|}}}" cellspacing="0" <!--
-->style="{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!--


--><table cellspacing="0" class="nowraplinks {{#if:{{{title|}}}|{{#switch:{{{state|}}}|plain|off=|<!--
== Example ==
-->#default=mw-collapsible {{#if:{{{state|}}}|{{{state}}}|mw-collapsed}}}}}} {{#switch:{{{border|{{{1|}}}}}}|<!--
{{Navbox
-->subgroup|child|none=navbox-subgroup" style="width:100%;{{{bodystyle|}}};{{{style|}}}|<!--
-->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};" data-expandtext="show" data-collapsetext="hide"><!--


|Header = Header


---Title and Navbar---
|Body1 = Body1
-->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<!--
--><td class="navbox-group" style="{{{basestyle|}}};{{{groupstyle|}}};{{{titlegroupstyle|}}}">{{{titlegroup|}}}</td><!--
--><th style="border-left:2px solid #fdfdfd;width:100%;|<th style="}}{{{basestyle|}}};{{{titlestyle|}}}" <!--
-->colspan={{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}{{#if:{{{titlegroup|}}}|-1}}}} <!--
-->class="navbox-title"><!--


-->{{#if:{{#switch:{{{navbar|}}}|plain|off=1}}<!--
|Group2 = Group2
-->{{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}|<!--
|Body2 = Body2
-->{{#ifeq:{{{navbar|}}}|off|{{#ifeq:{{{state|}}}|plain|<span style="float:right;width:6em;">&nbsp;</span>}}|<!--
-->{{#ifeq:{{{state|}}}|plain||<span style="float:left;width:6em;">&nbsp;</span>}}}}|<!--
--><span style="float:left;width:6em;text-align:left;">{{#if:{{{name|}}}|<!--
-->{{Navbar|{{{name}}}|mini=1|fontstyle={{{basestyle|}}};{{{titlestyle|}}};<!--
-->background:none transparent;border:none;font-size:100%;}}|<!--
--><span class="error" style="white-space:nowrap;">Error: No name provided</span>}}</span><!--
-->{{#ifeq:{{{state|}}}|plain|<span style="float:right;width:6em;">&nbsp;</span>}}}}<!--


--><span class="{{{titleclass|}}}" style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!--
|Group3 = Group3
-->{{{title}}}</span></th></tr>}}<!--
|Group3.1 = Group3.1
|Group3.2 = Group3.2


|Body3 = Body3
|Body3.2 = Body3.2


---Above---
}}
-->{{#if:{{{above|}}}|<!--
-->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
--><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{abovestyle|}}}" <!--
-->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{above}}}</td></tr>}}<!--


== Usage ==
{| style="width: 100%;"
! Short Format (no sub-headers)
! Complete Format
|-
| style="vertical-align: top; width: 50%;" |
<pre>
{{Navbox


---Body---
|Header =


---First group/list and images---
|Group1 =
-->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<tr style="height:2px;"><td></td></tr>}}<tr><!--
|Body1 =


-->{{#if:{{{imageleft|}}}|<!--
|Group2 =
--><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!--
|Body2 =
-->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!--
-->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!--
-->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!--
-->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!--
-->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}}}><!--
-->{{{imageleft}}}</td>}}<!--


-->{{#if:{{{group1|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group1style|}}}"><!--
|Group3 =
-->{{{group1}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list1style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list1}}}</div></td><!--


-->{{#if:{{{image|}}}|<!--
|Group4 =
--><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!--
|Body4 =
-->rowspan={{#expr:1{{#if:{{{list2|}}}|+2}}{{#if:{{{list3|}}}|+2}}{{#if:{{{list4|}}}|+2}}<!--
-->{{#if:{{{list5|}}}|+2}}{{#if:{{{list6|}}}|+2}}{{#if:{{{list7|}}}|+2}}{{#if:{{{list8|}}}|+2}}<!--
-->{{#if:{{{list9|}}}|+2}}{{#if:{{{list10|}}}|+2}}{{#if:{{{list11|}}}|+2}}{{#if:{{{list12|}}}|+2}}<!--
-->{{#if:{{{list13|}}}|+2}}{{#if:{{{list14|}}}|+2}}{{#if:{{{list15|}}}|+2}}{{#if:{{{list16|}}}|+2}}<!--
-->{{#if:{{{list17|}}}|+2}}{{#if:{{{list18|}}}|+2}}{{#if:{{{list19|}}}|+2}}{{#if:{{{list20|}}}|+2}}}}><!--
-->{{{image}}}</td>}}<!--


--></tr>}}<!--
|Group5 =
|Body5 =


|Group6 =
|Body6 =


---Remaining groups/lists---
|Group7 =
|Body7 =


-->{{#if:{{{list2|}}}|<!--
}}</pre>
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
|
-->{{#if:{{{group2|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!--
<pre>
-->{{{group2}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
{{Navbox
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list2style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list2}}}</div></td></tr>}}<!--


-->{{#if:{{{list3|}}}|<!--
|Header =
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
-->{{#if:{{{group3|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group3style|}}}"><!--
-->{{{group3}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list3style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list3}}}</div></td></tr>}}<!--


-->{{#if:{{{list4|}}}|<!--
|Group1 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Group1.1 =
-->{{#if:{{{group4|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group4style|}}}"><!--
|Group1.2 =
-->{{{group4}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Group1.3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list4style|}}}" <!--
|Group1.4 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
|Group1.5 =
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list4}}}</div></td></tr>}}<!--


-->{{#if:{{{list5|}}}|<!--
|Body1 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Body1.2 =
-->{{#if:{{{group5|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group5style|}}}"><!--
|Body1.3 =
-->{{{group5}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body1.4 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list5style|}}}" <!--
|Body1.5 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list5}}}</div></td></tr>}}<!--


-->{{#if:{{{list6|}}}|<!--
|Group2 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Group2.1 =
-->{{#if:{{{group6|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group6style|}}}"><!--
|Group2.2 =
-->{{{group6}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Group2.3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list6style|}}}" <!--
|Group2.4 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
|Group2.5 =
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list6}}}</div></td></tr>}}<!--


-->{{#if:{{{list7|}}}|<!--
|Body2 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Body2.2 =
-->{{#if:{{{group7|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group7style|}}}"><!--
|Body2.3 =
-->{{{group7}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body2.4 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list7style|}}}" <!--
|Body2.5 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list7}}}</div></td></tr>}}<!--


-->{{#if:{{{list8|}}}|<!--
|Group3 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Group3.1 =
-->{{#if:{{{group8|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group8style|}}}"><!--
|Group3.2 =
-->{{{group8}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Group3.3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list8style|}}}" <!--
|Group3.4 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
|Group3.5 =
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list8}}}</div></td></tr>}}<!--


-->{{#if:{{{list9|}}}|<!--
|Body3 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Body3.2 =
-->{{#if:{{{group9|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group9style|}}}"><!--
|Body3.3 =
-->{{{group9}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body3.4 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list9style|}}}" <!--
|Body3.5 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list9}}}</div></td></tr>}}<!--


-->{{#if:{{{list10|}}}|<!--
|Group4 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Group4.1 =
-->{{#if:{{{group10|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group10style|}}}"><!--
|Group4.2 =
-->{{{group10}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Group4.3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list10style|}}}" <!--
|Group4.4 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
|Group4.5 =
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list10}}}</div></td></tr>}}<!--


-->{{#if:{{{list11|}}}|<!--
|Body4 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Body4.2 =
-->{{#if:{{{group11|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group11style|}}}"><!--
|Body4.3 =
-->{{{group11}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body4.4 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list11style|}}}" <!--
|Body4.5 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list11}}}</div></td></tr>}}<!--


-->{{#if:{{{list12|}}}|<!--
|Group5 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Group5.1 =
-->{{#if:{{{group12|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group12style|}}}"><!--
|Group5.2 =
-->{{{group12}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Group5.3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list12style|}}}" <!--
|Group5.4 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
|Group5.5 =
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list12}}}</div></td></tr>}}<!--


-->{{#if:{{{list13|}}}|<!--
|Body5 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Body5.2 =
-->{{#if:{{{group13|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group13style|}}}"><!--
|Body5.3 =
-->{{{group13}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body5.4 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list13style|}}}" <!--
|Body5.5 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list13}}}</div></td></tr>}}<!--


-->{{#if:{{{list14|}}}|<!--
|Group6 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Group6.1 =
-->{{#if:{{{group14|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group14style|}}}"><!--
|Group6.2 =
-->{{{group14}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Group6.3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list14style|}}}" <!--
|Group6.4 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
|Group6.5 =
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list14}}}</div></td></tr>}}<!--


-->{{#if:{{{list15|}}}|<!--
|Body6 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Body6.2 =
-->{{#if:{{{group15|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group15style|}}}"><!--
|Body6.3 =
-->{{{group15}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body6.4 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list15style|}}}" <!--
|Body6.5 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list15}}}</div></td></tr>}}<!--


-->{{#if:{{{list16|}}}|<!--
|Group7 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Group7.1 =
-->{{#if:{{{group16|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group16style|}}}"><!--
|Group7.2 =
-->{{{group16}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Group7.3 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list16style|}}}" <!--
|Group7.4 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
|Group7.5 =
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list16}}}</div></td></tr>}}<!--


-->{{#if:{{{list17|}}}|<!--
|Body7 =
--><tr style="height:2px"><td></td></tr><tr><!--
|Body7.2 =
-->{{#if:{{{group17|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group17style|}}}"><!--
|Body7.3 =
-->{{{group17}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
|Body7.4 =
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list17style|}}}" <!--
|Body7.5 =
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list17}}}</div></td></tr>}}<!--


-->{{#if:{{{list18|}}}|<!--
}}</pre>
--><tr style="height:2px"><td></td></tr><tr><!--
|}[[Category:Navigation templates]]</noinclude>
-->{{#if:{{{group18|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group18style|}}}"><!--
-->{{{group18}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list18style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list18}}}</div></td></tr>}}<!--

-->{{#if:{{{list19|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group19|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group19style|}}}"><!--
-->{{{group19}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{oddstyle|}}};{{{list19style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list19}}}</div></td></tr>}}<!--

-->{{#if:{{{list20|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group20|}}}|<td class="navbox-group" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group20style|}}}"><!--
-->{{{group20}}}</td><td style="text-align:left;border-left-width:2px;border-left-style:solid;|<td colspan=2 style="}}<!--
-->{{#if:{{{groupwidth|}}}||width:100%;}}padding:0px;{{{liststyle|}}};{{{evenstyle|}}};{{{list20style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list20}}}</div></td></tr>}}<!--


---Below---
-->{{#if:{{{below|}}}|<!--
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}{{{list3|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
--><tr><td class="navbox-abovebelow" style="{{{basestyle|}}};{{{belowstyle|}}}" <!--
-->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}">{{{below}}}</td></tr>}}<!--


--></table>{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=<div>|none=|#default=</td></tr></table>}}
</includeonly></onlyinclude>
{{Documentation}}

Latest revision as of 02:32, 9 February 2024

[view | edit | purge]Template Documentation

Usage

Please remove the parameters that are left blank.

{{Navbox
| name       = {{subst:PAGENAME}}{{subst:void|Don't change anything on this line. It will change itself when you save.}}
| title      =
| listclass  = hlist
| state      = {{{state|}}}

| above      =
| image      =

| group1     =
| list1      =

| group2     =
| list2      =
<!-- ... -->
| group20    =
| list20     =

| below      =
}}

Parameter list


The navbox uses lowercase parameter names, as shown in the box (above). The required name and title will create a one-line box if other parameters are omitted.

Notice "group1" (etc.) is optional, as are sections named "above/below".

The basic and most common parameters are as follows (see below for the full list):

name – the name of the template.
title – text in the title bar, such as: [[Widget stuff]].
listclass – a CSS class for the list cells, usually hlist for horizontal lists. Alternatively, use bodyclass for the whole box.
state – controls when a navbox is expanded or collapsed.
titlestyle – a CSS style for the title-bar, such as: background: gray;
groupstyle – a CSS style for the group-cells, such as: background: #eee;
above – text to appear above the group/list section (could be a list of overall wikilinks).
image – an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as [[File:XX.jpg|80px|link=|alt=]].
imageleft – an optional left-side image (code the same as the "image" parameter).
groupn – the left-side text before list-n (if group-n omitted, list-n starts at left of box).
listn – text listing wikilinks using a wikilist format.
below – optional text to appear below the group/list section.

Parameter descriptions

The following is a complete list of parameters for using {{Navbox}}. In most cases, the only required parameters are name, title, and list1.

Setup parameters

name
The name of the template, which is needed for the "V • T • E" ("View • Talk • Edit") links to work properly on all pages where the template is used. You can enter {{subst:PAGENAME}} for this value as a shortcut. The name parameter is only mandatory if a title is specified, and the border parameter is not set, and the navbar parameter is not used to disable the navbar.
state [autocollapse, collapsed, expanded, plain, off]
  • Defaults to autocollapse. A navbox with autocollapse will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded.
  • If set to collapsed, the navbox will always start out in a collapsed state.
  • If set to expanded, the navbox will always start out in an expanded state.
  • If set to plain, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the V • T • E links).
  • If set to off, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside <noinclude|>...</noinclude|> tags. This setting will force the box visible when standalone (even when followed by other boxes), displaying "[hide]", but then it will auto-collapse the box when stacked inside an article:
| state = <noinclude|>expanded</noinclude|>
Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this:
  • In your intermediate template, create a parameter also named "state" as a pass-through like this:
| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}
  • The <includeonly>| will make the template expanded when viewing the template page by itself.
navbar
If set to plain, the V • T • E links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use off to remove the V • T • E links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.
border

See Also

[view | edit | purge]The above documentation is transcluded from Template:Navbox/doc.