Template:Navbox: Difference between revisions

From Sword of Moonlight Wiki
Jump to navigation Jump to search
Created page with "<!-- Please do not edit without discussion first as this is a VERY complex template. -->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table class="navbo..."
 
dlw>Alex4401
No edit summary
Line 1: Line 1:
<!--
<includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude>[[Category:Navigation templates]] {{documentation}}</noinclude>
 
Please do not edit without discussion first as this is a VERY complex template.
 
-->{{#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=|<!--
-->#default=collapsible {{#if:{{{state|}}}|{{{state}}}|autocollapse}}}}}} {{#switch:{{{border|{{{1|}}}}}}|<!--
-->subgroup|child|none=navbox-subgroup" style="width:100%;{{{bodystyle|}}};{{{style|}}}|<!--
-->#default=" style="width:100%;background:transparent;color:inherit}};{{{innerstyle|}}};"><!--
 
 
---Title and Navbar---
-->{{#if:{{{title|}}}|<tr>{{#if:{{{titlegroup|}}}|<!--
--><td class="navbox-group {{{titlegroupclass|}}}" 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}}<!--
-->{{#if:{{{name|}}}||{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=1}}}}|<!--
-->{{#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}}%;"><!--
-->{{{title}}}</span></th></tr>}}<!--
 
 
---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>}}<!--
 
 
---Body---
 
---First group/list and images---
-->{{#if:{{{list1|}}}|{{#if:{{{title|}}}{{{above|}}}|<tr style="height:2px;"><td></td></tr>}}<tr><!--
 
-->{{#if:{{{imageleft|}}}|<!--
--><td style="width:0%;padding:0px 2px 0px 0px;{{{imageleftstyle|}}}" <!--
-->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 {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group1style|}}}"><!--
-->{{{group1}}}</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|}}};{{{list1style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{list1padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list1}}}</div></td><!--
 
-->{{#if:{{{image|}}}|<!--
--><td style="width:0%;padding:0px 0px 0px 2px;{{{imagestyle|}}}" <!--
-->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>}}<!--
 
 
---Remaining groups/lists---
 
-->{{#if:{{{list2|}}}|<!--
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
-->{{#if:{{{group2|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!--
-->{{{group2}}}</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|}}};{{{list2style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list2}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list3|}}}|<!--
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
-->{{#if:{{{group3|}}}|<td class="navbox-group {{{groupclass|}}}" 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|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group4|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group4style|}}}"><!--
-->{{{group4}}}</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|}}};{{{list4style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list4}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list5|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group5|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group5style|}}}"><!--
-->{{{group5}}}</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|}}};{{{list5style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list5}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list6|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group6|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group6style|}}}"><!--
-->{{{group6}}}</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|}}};{{{list6style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list6}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list7|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group7|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group7style|}}}"><!--
-->{{{group7}}}</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|}}};{{{list7style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list7}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list8|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group8|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group8style|}}}"><!--
-->{{{group8}}}</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|}}};{{{list8style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list8}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list9|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group9|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group9style|}}}"><!--
-->{{{group9}}}</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|}}};{{{list9style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list9}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list10|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group10|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group10style|}}}"><!--
-->{{{group10}}}</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|}}};{{{list10style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list10}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list11|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group11|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group11style|}}}"><!--
-->{{{group11}}}</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|}}};{{{list11style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list11}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list12|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group12|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group12style|}}}"><!--
-->{{{group12}}}</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|}}};{{{list12style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list12}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list13|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group13|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group13style|}}}"><!--
-->{{{group13}}}</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|}}};{{{list13style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list13}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list14|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group14|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group14style|}}}"><!--
-->{{{group14}}}</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|}}};{{{list14style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list14}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list15|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group15|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group15style|}}}"><!--
-->{{{group15}}}</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|}}};{{{list15style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list15}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list16|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group16|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group16style|}}}"><!--
-->{{{group16}}}</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|}}};{{{list16style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|odd|{{{evenodd|even}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list16}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list17|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group17|}}}|<td class="navbox-group {{{groupclass|}}}" style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group17style|}}}"><!--
-->{{{group17}}}</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|}}};{{{list17style|}}}" <!--
-->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}}"><!--
--><div style="padding:{{{listpadding|0em 0.25em}}}">
{{{list17}}}</div></td></tr>}}<!--
 
-->{{#if:{{{list18|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
-->{{#if:{{{group18|}}}|<td class="navbox-group {{{groupclass|}}}" 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 {{{groupclass|}}}" 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 {{{groupclass|}}}" 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 {{{belowclass|}}}" 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>}}<!--
 
--><noinclude>
 
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

Revision as of 21:26, 15 March 2024

Template documentation follows
Note: the template above may sometimes be partially or fully invisible.
Visit Template:Navbox/doc to edit this documentation. (How does this work?)

This template uses one or more modules written in the Lua programming language.

For more information, see Wikipedia:Lua or the Lua reference manual on mediawiki.org. Modules used include: Navbox.

This template allows a navigational template to be set up relatively quickly by supplying it with one or more lists of links. Using this template is highly recommended for standardization of navigational templates, and for ease of use.

Usage

Please remove the parameters that are left blank.

{{Navbox
| name       = {{subst:PAGENAME}}
| title      =
| listclass  = hlist
| state      = {{{state|}}}

| above      =
| image      =

| group1     =
| list1      =

| group2     =
| list2      =

| group3     =
| list3      =

<!-- ... -->

| 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]].
class - an optional CSS class for the entire navbox, to enable custom styling.
listclass – a CSS class for the list cells, usually hlist for horizontal lists.
state – controls when a navbox is expanded or collapsed.
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.
See later section on using navboxes within one another for examples and a more complete description. If set to child or subgroup, then the navbox can be used as a borderless child that fits snugly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the list area of its parent navbox. If set to none, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the none option inside of another navbox; similarly, only use the child/subgroup option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named border parameter):
{{Navbox|child|...}}

Cells

title*
Text that appears centered in the top row of the table. It is usually the template's topic, i.e. a succinct description of the body contents. This should be a single line, but if a second line is needed, use {{-}} to ensure proper centering. This parameter is technically not mandatory, but using {{Navbox}} is rather pointless without a title.
above*
A full-width cell displayed between the titlebar and first group/list, i.e. above the template's body (groups, lists and image). In a template without an image, above behaves in the same way as the list1 parameter without the group1 parameter.
groupn*
(i.e. group1, group2, etc.) If specified, text appears in a header cell displayed to the left of listn. If omitted, listn uses the full width of the table.
listn*
(i.e. list1, list2, etc.) The body of the template, usually a list of links. Format is inline, although the text can be entered on separate lines if the entire list is enclosed within <div> </div>. At least one list parameter is required; each additional list is displayed in a separate row of the table. Each listn may be preceded by a corresponding groupn parameter, if provided (see below).
Entries should be separated using a newline and an asterisk (*). If instead two asterisks are used, it provides nesting within the previous entry by enclosing the entry with brackets. Increasing the number of asterisks used increases the number of brackets around entries.
imageleft*
An image to be displayed in a cell below the title and to the left of the body (lists). For the image to display properly, the list1 parameter must be specified and no groups can be specified. It accepts the same sort of parameter that image accepts.
below*
A full-width cell displayed below the template's body (groups, lists and image).

Layout of table

Without image, above and below

Table generated by {{Navbox}} without image, above and below parameters:

With image, above and below

Table generated by {{Navbox}} with image, above and below parameters:

With image and without groups

Table generated by {{Navbox}} with image, imageleft, lists, and without groups, above, below:

Examples

TemplateData

Creates a navigational box for links to other pages.

Template parameters

ParameterDescriptionTypeStatus
Namename

The name of the template. Needed for "View • Talk • Edit" links to work properly.

Default
{{subst:PAGENAME}}
Stringsuggested
Titletitle

Text in the title bar; centered in the top row of the table. Usually the template's topic.

Example
[[Template:Navbox]]
Unknownsuggested
Navbox classclass

CSS class for the navbox.

Example
navbox-items
Stringoptional
Group 1group1

If specified, text appears in a header cell displayed to the left of list 1. If omitted, list 1 uses the full width of the table.

Unknownsuggested
List 1list1

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 listn may be preceded by a corresponding groupn parameter. Entries should be separated using a newline and an asterisk. If two asterisks are used, it provides nesting within the previous entry with brackets.

Unknownrequired
List classlistclass

CSS class for the list cells, usually hlist for horizontal lists.

Example
hlist
Stringoptional
Statestate

Controls when a navbox is expanded or collapsed

Suggested values
autocollapse collapsed expanded plain off
Default
autocollapse
Example
autocollapse
Unknownsuggested
Aboveabove

Full-width cell displayed between the titlebar and first group/list, i.e. above the template's body (groups, lists and image)

Stringsuggested
Belowbelow

Full-width cell displayed below the template's body.

Unknownsuggested
Imageimage

Image to be displayed in a cell below the title and to the right of the body

Example
[[File:XX.jpg | 80px | link= | alt= ]]
Filesuggested
group2group2

no description

Unknownsuggested
list2list2

no description

Unknownsuggested
group3group3

no description

Unknownsuggested
list3list3

no description

Unknownsuggested
group4group4

no description

Unknownoptional
list4list4

no description

Unknownoptional
Image leftimageleft

Image to be displayed in a cell below the title and to the left of the body. For the image to display properly, list1 parameter must be specified and no groups can be specified.

Example
[[File:XX.jpg | 80px | link= | alt= ]]
Fileoptional
Navbar statusnavbar

no description

Example
plain, off
Stringoptional
Border statusborder

no description

Example
child, subgroup, none
Stringoptional
evenoddevenodd

no description

Suggested values
swap even odd off
Unknownoptional