Jump to content

Template:Navbox: Difference between revisions

From The Petit Planet Wiki
No edit summary
No edit summary
Tag: Manual revert
 
Line 25: Line 25:
---Above---
---Above---
-->{{#if:{{{above|}}}|<!--
-->{{#if:{{{above|}}}|<!--
-->{{#if:{{{title|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
  --><tr><td class="navbox-abovebelow {{{aboveclass|}}}" style="{{{basestyle|}}};{{{abovestyle|}}}" <!--
  --><tr><td class="navbox-abovebelow {{{aboveclass|}}}" style="{{{basestyle|}}};{{{abovestyle|}}}" <!--
  -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}"><div>
  -->colspan="{{#expr:2{{#if:{{{imageleft|}}}|+1}}{{#if:{{{image|}}}|+1}}}}"><div>
Line 32: Line 33:


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


-->{{#if:{{{imageleft|}}}|<!--
-->{{#if:{{{imageleft|}}}|<!--
Line 60: Line 62:
{{{image}}}</div></td>}}<!--
{{{image}}}</div></td>}}<!--


--></tr>}}<!--


---Remaining groups/lists---
---Remaining groups/lists---


-->{{#if:{{{list2|}}}|<!--
-->{{#if:{{{list2|}}}|<!--
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
  -->{{#if:{{{group2|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group2|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group2style|}}}"><!--
Line 71: Line 75:
  --><div style="padding:{{{list2padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list2padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list2}}}
{{{list2}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list3|}}}|<!--
-->{{#if:{{{list3|}}}|<!--
-->{{#if:{{{title|}}}{{{above|}}}{{{list1|}}}{{{list2|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
  -->{{#if:{{{group3|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group3|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group3style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group3style|}}}"><!--
Line 81: Line 86:
  --><div style="padding:{{{list3padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list3padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list3}}}
{{{list3}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list4|}}}|<!--
-->{{#if:{{{list4|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group4|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group4|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group4style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group4style|}}}"><!--
Line 91: Line 97:
  --><div style="padding:{{{list4padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list4padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list4}}}
{{{list4}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list5|}}}|<!--
-->{{#if:{{{list5|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group5|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group5|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group5style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group5style|}}}"><!--
Line 101: Line 108:
  --><div style="padding:{{{list5padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list5padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list5}}}
{{{list5}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list6|}}}|<!--
-->{{#if:{{{list6|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group6|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group6|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group6style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group6style|}}}"><!--
Line 111: Line 119:
  --><div style="padding:{{{list6padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list6padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list6}}}
{{{list6}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list7|}}}|<!--
-->{{#if:{{{list7|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group7|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group7|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group7style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group7style|}}}"><!--
Line 121: Line 130:
  --><div style="padding:{{{list7padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list7padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list7}}}
{{{list7}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list8|}}}|<!--
-->{{#if:{{{list8|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group8|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group8|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group8style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group8style|}}}"><!--
Line 131: Line 141:
  --><div style="padding:{{{list8padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list8padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list8}}}
{{{list8}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list9|}}}|<!--
-->{{#if:{{{list9|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group9|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group9|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group9style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group9style|}}}"><!--
Line 141: Line 152:
  --><div style="padding:{{{list9padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list9padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list9}}}
{{{list9}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list10|}}}|<!--
-->{{#if:{{{list10|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group10|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group10|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group10style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group10style|}}}"><!--
Line 151: Line 163:
  --><div style="padding:{{{list10padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list10padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list10}}}
{{{list10}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list11|}}}|<!--
-->{{#if:{{{list11|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group11|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group11|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group11style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group11style|}}}"><!--
Line 161: Line 174:
  --><div style="padding:{{{list11padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list11padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list11}}}
{{{list11}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list12|}}}|<!--
-->{{#if:{{{list12|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group12|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group12|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group12style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group12style|}}}"><!--
Line 171: Line 185:
  --><div style="padding:{{{list12padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list12padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list12}}}
{{{list12}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list13|}}}|<!--
-->{{#if:{{{list13|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group13|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group13|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group13style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group13style|}}}"><!--
Line 181: Line 196:
  --><div style="padding:{{{list13padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list13padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list13}}}
{{{list13}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list14|}}}|<!--
-->{{#if:{{{list14|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group14|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group14|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group14style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group14style|}}}"><!--
Line 191: Line 207:
  --><div style="padding:{{{list14padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list14padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list14}}}
{{{list14}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list15|}}}|<!--
-->{{#if:{{{list15|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group15|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group15|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group15style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group15style|}}}"><!--
Line 200: Line 217:
  -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}} {{{listclass|}}}"><!--
  -->class="navbox-list navbox-{{#ifeq:{{{evenodd|}}}|swap|even|{{{evenodd|odd}}}}} {{{listclass|}}}"><!--
  --><div style="padding:{{{list15padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list15padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list15}}}</div></td>}}<!--
{{{list15}}}</div></td></tr>}}<!--


-->{{#if:{{{list16|}}}|<!--
-->{{#if:{{{list16|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group16|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group16|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group16style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group16style|}}}"><!--
Line 210: Line 228:
  --><div style="padding:{{{list16padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list16padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list16}}}
{{{list16}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list17|}}}|<!--
-->{{#if:{{{list17|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group17|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group17|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group17style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group17style|}}}"><!--
Line 220: Line 239:
  --><div style="padding:{{{list17padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list17padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list17}}}
{{{list17}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list18|}}}|<!--
-->{{#if:{{{list18|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group18|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group18|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group18style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group18style|}}}"><!--
Line 230: Line 250:
  --><div style="padding:{{{list18padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list18padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list18}}}
{{{list18}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list19|}}}|<!--
-->{{#if:{{{list19|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group19|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group19|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group19style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group19style|}}}"><!--
Line 240: Line 261:
  --><div style="padding:{{{list19padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list19padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list19}}}
{{{list19}}}
</div></td>}}<!--
</div></td></tr>}}<!--


-->{{#if:{{{list20|}}}|<!--
-->{{#if:{{{list20|}}}|<!--
--><tr style="height:2px"><td></td></tr><tr><!--
  -->{{#if:{{{group20|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->{{#if:{{{group20|}}}|<th scope="row" class="navbox-group {{{groupclass|}}}" <!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group20style|}}}"><!--
  -->style="{{{basestyle|}}};{{#if:{{{groupwidth|}}}|width:{{{groupwidth}}};}}{{{groupstyle|}}};{{{group20style|}}}"><!--
Line 250: Line 272:
  --><div style="padding:{{{list20padding|{{{listpadding|0em 0.25em}}}}}}">
  --><div style="padding:{{{list20padding|{{{listpadding|0em 0.25em}}}}}}">
{{{list20}}}
{{{list20}}}
</div></td>}}<!--
</div></td></tr>}}<!--





Latest revision as of 21:55, 13 November 2025

Template documentation
Note: parts of or the entire template might not be visible without values provided.
This template uses CSS found at MediaWiki:Navbox.css (edit | hist) and MediaWiki:Colors.css (edit | hist).

Base template for all Navboxes.

Syntax[edit source]

Parameter(s) Usage Default value(s)
{{{name}}} Should be identical to the template's name without namespace. {{{name}}}
{{{title}}} Sets the title used at the top of the navbox. {{{title}}}
{{{state}}} Allows you to change the collapsing state of the table. More info. Collapsed is removed while on pages in the Template namespace, to make editing easier. collapsible
{{{titleclass}}} Set the css class used for the title area. None
{{{titlestyle}}} Allows custom styling for the title area. None
{{{bodyclass}}} Set the css class used for the body area. None
{{{bodystyle}}} Allows custom styling for the body area. None
{{{groupclass}}} Set the css class used for the group area. None
{{{groupstyle}}} Allows custom styling for the group area. None
{{{listclass}}} Set the css class used for the list area. None
{{{liststyle}}} Allows custom styling for the list area. None
{{{evenodd}}} Can be set to "swap" to reverse the order of styling among lists (starts with even by default). None
{{{1}}} Can be set to "child" or "subgroup" to use styling intended for nested navboxes. None
{{{group1-20}}} Adds the heading for the group number specified. {{{group1}}} = {{{group1}}}
{{{group2-20}}} = None
{{{list1-20}}} Adds text for the list number specified. {{{list1}}} = {{{list1}}}
{{{list2-20}}} = None

Sample output[edit source]

{{Navbox
|name      = Navbox
|title     = Navbox
|bodyclass = hlist

|group1    = Group 1
|list1     = List 1

|group2    = Group 2
|list2     = 
  {{Navbox|child
  |evenodd = swap
  |group1  = Group 2.1
  |list1   = List 2.1
  |group2  = Group 2.2
  |list2   = List 2.2
  |group3  = Group 2.3
  |list3   = List 2.3
  }}

|group3    = Group 3
|list3     =
* List 3
* List
* List
}}