Template:Simple navbox/doc
Jump to navigation
Jump to search
| This is a documentation subpage for Template:Simple navbox. It contains usage information, categories, and other content that is not part of the original template page. |
| 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 barcollapsibleorcollapse– defaults toyes, set tonoif you want a non-collapsible navigation templateimage– optional image, uses wiki syntax, as in:[[File:Example.png|50px]], will not show if|collapsible=noimageleftorimage2– optional image, likeimageexcept it's on the left. You can use bothimageandimageleft, unlessimage-outeris 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-alignorimage-valignparameters, MUST have|collapsible=no, overridesimageas well.bodystyle– inline styling for the whole navbox container, such as:background:red; color:whitetitlestyleorheaderstyle– 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-capslist– 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 blueoddgroupstyleandevengroupstyle– inline styling for every odd or even group, overridesgroupstyle[4]oddliststyleandevenliststyle– inline styling for every odd or even list, overridesliststylegroupnstyle– inline styling for the nth group row, with n being the number, likegroup4style, overridesoddgroupstyleandevengroupstylelistnstyle– inline styling for the nth list row, with n being the number, likelist4style, overridesoddliststyleandevenliststyleaboveorbelow– adds a group row above, or below, the group listabovestyleorbelowstyle– 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.csswould load the stylesheet at Template:Example/styles.css
Footnotes
- ↑ You can either use
imageand move it to the left, or just useimageleft. The way the code works, usingimageleftand setting this parameter toleftwill move it to the right. - ↑ Using this paramter adds the
.simple-header-modifiedclass 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-modifiedclass 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