Template:Navbox: Difference between revisions
Dorandraco (talk | contribs) m 1 revision imported: Import navbox template |
Dorandraco (talk | contribs) Add aria to navbox |
||
| (One intermediate revision by the same user not shown) | |||
| Line 4: | Line 4: | ||
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table cellspacing="0" <!-- | -->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table cellspacing="0" <!-- | ||
-->class="navbox" style="border-spacing:0;{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!-- | -->class="navbox" role="navigation" aria-labelledby="navbox-title-{{anchorencode:{{{title}}}}}" style="border-spacing:0;{{{bodystyle|}}};{{{style|}}}"><tr><td style="padding:2px;">}}<!-- | ||
--><table cellspacing="0" class="nowraplinks {{{bodyclass|}}} {{#if:{{{title|}}}|{{#switch:{{{state|}}}|<!-- | --><table cellspacing="0" class="nowraplinks {{{bodyclass|}}} {{#if:{{{title|}}}|{{#switch:{{{state|}}}|<!-- | ||
| Line 27: | Line 27: | ||
--></div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:6em"> </div>}}}}<!-- | --></div>{{#ifeq:{{{state|}}}|plain|<div style="float:right;width:6em"> </div>}}}}<!-- | ||
--><span class="{{{titleclass|}}}" style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!-- | --><span class="{{{titleclass|}}}" id="navbox-title-{{anchorencode:{{{title}}}}}" style="font-size:{{#switch:{{{border|{{{1|}}}}}}|subgroup|child|none=100|#default=110}}%;"><!-- | ||
-->{{{title}}}</span></th></tr>}}<!-- | -->{{{title}}}</span></th></tr>}}<!-- | ||
| Line 306: | Line 306: | ||
}} | }} | ||
}}}}</div></includeonly><noinclude> | }}}}</div></includeonly><noinclude> | ||
{{ | {{Template:Navbox/doc}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 14:44, 21 September 2025
Description
This template should be used in navbox templates, which should be included at the bottom of each page that is linked in the template.
Usage
| 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 |
| {{{titlestyle}}} | Allows custom styling for the title area | None |
| {{{bodystyle}}} | Allows custom styling for the body area | None |
| {{{groupstyle}}} | Allows custom styling for the group area | None |
| {{{liststyle}}} | Allows custom styling for the list area | 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
{{Navbox
| name = Navbox Name
| title = Navbox Title
| bodyclass = hlist
| group1 = Group 1
| list1 = List 1
| group2 = Group 2
| list2 = {{Navbox|child
| group1 = Group 2.1
| list1 = List 2.1
| group2 = Group 2.2
| list2 = {{Navbox|child
| group1 = Group 2.2.1
| list1 = List 2.2.1
| group2 = Group 2.2.2
| list2 = List 2.2.2
}}
| group3 = Group 2.3
| list3 = List 2.3
}}
| group3 = Group 3
| list3 =
* List 3
* List
* List
}}
| ||||||||||||||||||||||||