Template:Navbox/doc: Difference between revisions

From BoyWiki
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 45: Line 45:
| state  = uncollapsed
| state  = uncollapsed
| title      = test
| title      = test
| above  = test
| abovestyle = background:#cedff2;
| listclass  = hlist
| titlestyle = {{{titlestyle|background:#cedff2;}}}
| titlestyle = {{{titlestyle|background:#cedff2;}}}
| groupstyle = line-height:1.2em;{{{groupstyle|background:#cedff2;}}}
| groupstyle = line-height:1.2em;{{{groupstyle|background:#cedff2;}}}
Line 55: Line 58:
| list2style = line-height:1.2em;{{{list2style|background:#f5faff;}}}
| list2style = line-height:1.2em;{{{list2style|background:#f5faff;}}}
| list2      =  
| list2      =  
 
*test
{{bp}} test {{bp}} test {{bp}} test {{bp}} test {{bp}} test {{bp}} test
*test
*test
*test
*test
*test
| group3    = test
| list3style = line-height:1.2em;
| list3      =  
*test
*test
*test
*test
*test
*test
 
 
<BR>
<BR>
Line 66: Line 82:


{{Navbox
{{Navbox
| name      = Navbox Test
| name      = Navbox/doc
| state  = uncollapsed
| title      = test
| title      = test
| above  = test
| abovestyle = background:#cedff2;
| listclass  = hlist
| titlestyle = {{{titlestyle|background:#cedff2;}}}
| titlestyle = {{{titlestyle|background:#cedff2;}}}
| groupstyle = line-height:1.2em;{{{groupstyle|background:#cedff2;}}}
| groupstyle = line-height:1.2em;{{{groupstyle|background:#cedff2;}}}
Line 78: Line 98:
| list2style = line-height:1.2em;{{{list2style|background:#f5faff;}}}
| list2style = line-height:1.2em;{{{list2style|background:#f5faff;}}}
| list2      = &nbsp;
| list2      = &nbsp;
 
*test
{{bp}} test {{bp}} test {{bp}} test {{bp}} test {{bp}} test {{bp}} test
*test
*test
*test
*test
*test
| group3    = test
| list3style = line-height:1.2em;
| list3      = &nbsp;
*test
*test
*test
*test
*test
*test
&nbsp;
&nbsp;
<BR>
<BR>

Latest revision as of 12:28, 11 June 2015

Description
This template is used to create a basic navbox.
Syntax
For more information see: https://en.wikipedia.org/wiki/Template:Navbox/doc

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]].
listclass – a CSS class for the list cells, usually hlist for horizontal lists. Alternatively, use bodyclass for the whole box.
state – controls when a navbox is expanded or collapsed.
titlestyle – a CSS style for the title-bar, such as: background: gray;
groupstyle – a CSS style for the group-cells, such as: background: #eee;
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.
Sample output
{{Navbox
| name       = Navbox Test
| state  = uncollapsed
| title      = test
| above  = test
| abovestyle = background:#cedff2;
| listclass  = hlist
| titlestyle = {{{titlestyle|background:#cedff2;}}}
| groupstyle = line-height:1.2em;{{{groupstyle|background:#cedff2;}}}
| image = 
| group1     = test
| list1      =  
  '''{{bp}} test
 
| group2     = test
| list2style = line-height:1.2em;{{{list2style|background:#f5faff;}}}
| list2      =  
*test
*test
*test
*test
*test
*test
| group3     = test
| list3style = line-height:1.2em;
| list3      =  
*test
*test
*test
*test
*test
*test
 
<BR>
| belowstyle = background:#cedff2;
|below = test [[File:Bloge.png|30 px|link=Portal:Boylove News Channel]]
}}

Results in...