Template:Simple navbox
Jump to navigation
Jump to search
[edit] [ ]
Template documentation

![]() | This template uses TemplateStyles |
A simple navbox template used to construct other navigational templates. Use {{Navbox}} for anything more complicated.
Usage
Simple box with links
{{Simple navbox |name = {{subst:PAGENAME}} |title = |image = |list = }}
Simple box with ordered links
{{Simple navbox |name = {{subst:PAGENAME}} |title = |image = |group1 = |list1 = |group2 = |list2 = <!-- ... --> }}
{{Simple navbox |name = {{subst:PAGENAME}} |title = |image = |list = {{Simple navbox |title = |list = }} {{Simple navbox |title = |group1 = |list1 = }} <!-- ... --> }}
Parameter list
All Parameters
name
– the page name for the template, needed for the "v·t·e" section to work, omitting this will remove the "v·t·e" navbartitle
– text in the title barcollapsible
orcollapse
– defaults toyes
, set tono
if you want a non-collapsible navigation templateimage
– optional image, uses wiki syntax, as in:[[File:Example.png|50px]]
, will not show if|collapsible=no
imageleft
orimage2
– optional image, likeimage
except it's on the left. You can use bothimage
andimageleft
, unlessimage-outer
is used.image-align
– defaults toright
[1]image-valign
– defaults to "center" (like middle in "valign"), set to "auto" to vertically align the image to top, accepts values for "align-self" CSS propertyimage-outer
– likeimage
, except it sits next to the header and content, does NOT acceptimage-align
orimage-valign
parameters, MUST have|collapsible=no
, overridesimage
as well.bodystyle
– inline styling for the whole navbox container, such as:background:red; color:white
titlestyle
orheaderstyle
– inline styling for the navbox header, such as:font-size:200%; color:green
[2]navcontentstyle
– inline styling for all navbox content.containerstyle
– inline styling for navbox content, except{{{above}}}
and{{{below}}}
.contentstyle
– inline styling for div containing all grouped list content, such as:color:gray; font-variant:small-caps
list
– text listing the links you want, NOT compatible withgroup1
,list1
You can also use group1
, list1
parameters to make an ordered list.
group1
– name of group, goes up to 20list1
– list of links for group, goes up to 20groupstyle
– inline styling for each of the group rows, such asbackground: pink, border:1px solid blue
[3]liststyle
– inline styling for each of the list rows, such asbackground: pink, border:1px solid blue
oddgroupstyle
andevengroupstyle
– inline styling for every odd or even group, overridesgroupstyle
[4]oddliststyle
andevenliststyle
– inline styling for every odd or even list, overridesliststyle
groupnstyle
– inline styling for the nth group row, with n being the number, likegroup4style
, overridesoddgroupstyle
andevengroupstyle
listnstyle
– inline styling for the nth list row, with n being the number, likelist4style
, overridesoddliststyle
andevenliststyle
above
orbelow
– adds a group row above, or below, the group listabovestyle
orbelowstyle
– inline styling for the "above" or "below" rowtablestyle
– inline styling for table holding grouped lists
CSS trickery
WARNING: WILL BREAK STUFF IF YOU DO SOMETHING WRONG
You can specify a unique class for the template navbox by using bodyclass
bodyclass
– add your own CSS classes, either existing ones (i.e. "hlist", "hlist toccolours") or a custom one, which can be used with either {{#CSS:}} or TemplateStyles to further customize the navbox templatetemplatestyles
– loads a CSS stylesheet: setting parameter toExample/styles.css
would load the stylesheet at Template:Example/styles.css
Footnotes
- ↑ You can either use
image
and move it to the left, or just useimageleft
. The way the code works, usingimageleft
and setting this parameter toleft
will move it to the right. - ↑ Using this paramter adds the
.simple-header-modified
class to the header, which makes the VTE and navtoggle links inherit the color of the header, which saves time and effort for 99% of usecases. If that's not something you want, you'll have to use the templatestyles method in the CSS trickery section. - ↑ Using this parameter adds the
.simple-group-modified
class to the group-row table, which slightly modifies the styling of the groups and rows to make navboxes with colored backgrounds in group names look more organized. It shouldn't affect the look too much if that is not your intent, but that is still something to keep note of. - ↑ Unlike {{Navbox}}, no "oddstyle" or "evenstyle" exists