Abrir menu principal

Predefinição:Navbox generic

Revisão de 02h39min de 20 de maio de 2014 por Rcardoso (discussão | contribs)

 


Template documentation

This template allows creation Navbox, to facilitate navigation between related articles. So instead of adding list of see also links, we place Navbox template that can be updated in from a central place.

Blank template

{{Navbox 
|name       =
|title      =  

|group1     =  
|list1      =   
|group2     =  
|list2      =   
... 
|group20    =  
|list20     =   

|below      =  

Parameter list

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]].
state - controls when a navbox is expanded or collapsed.
image - an optional right-side image, coded as the whole image.[[File:XX.jpg|90px|link=|alt=]].
above - text to appear above the group/list section (could be a list of overall wikilinks).
groupn - the left-side text before list-n (if group-n omitted, list-n starts at left of box).
listn - text listing wikilinks, often separated by middot templates, such as: [[A]]{{·}} [[B]]
below - optional text to appear below the group/list section.


Additional Parameter

titlestyle - a CSS style for the title-bar, such as: background:gray;
groupstyle - a CSS style for the group-cells, such as: background:#eee;
oddstyle , evenstyle - Applies to odd/even list numbers. Overrules styles defined by liststyle.
listnstyle -
abovestyle -
bodystyle -
imagestyle -
belowstyle -


state* [autocollapse, uncollapsed, collapsed, plain, off]
  • Defaults to autocollapse. A navbox with autocollapse will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded. For the technically minded, see MediaWiki:Common.js.
  • If set to collapsed, the navbox will always start out in a collapsed state.
  • If set to plain, the navbox will always be expanded with no [hide] link on the right


Examples

Simple Example

{{Navbox generic
|name = Navbox_generic/doc
|title = Simple Example
|group1 = Group1
|list1 = List1
|group2 = Group2
|list2 = List2
|group3 = Group3
|list3 = List3
}}

Styles Example

{{Navbox generic
|name = Navbox_generic/doc
|image = [[File:No image.jpg|100px|link=|alt=]]
|title = Styles Example

| group-style = width:100px; background-color:#ddd;
| odd-style  = background-color:#F2F2F2;

|group1 = Group1
|list1 = List1
|group2 = Group2
|list2 = List2
|group3 = Group3
|list3 = List3
}}

Subgroups example

This example shows how subgroups can be used.

{{Navbox generic
|name = Navbox_generic/doc
|image = [[File:No image.jpg|100px|link=|alt=]]
|state = uncollapsed
|title = Multiple Subgroup Example
|above = Above
|below = Below

|group1 = Group1
|list1 = List1
|group2 = Group2
|list2 = 
 {{Navbox subgroup
  |evenodd = swap
  |group1 = Group2.1
  |list1 = List1
  |group2 = Group2.2
  |list2 = List2
  |group3 = Group2.3
  |list3 = List3
 }}

|group3 = Group3
|list3 = List3

|group4 = Group4
|list4 = 
 {{Navbox subgroup
  |evenodd = swap
  |group1 = Group4.1
  |list1 = List1
  |group2 = Group4.2
  |list2 = List2
  |group3 = Group4.3
  |list3 = List3
 }}
}}


Veja também

  • Wikipedia Navbox Template, for additional reference and documentation, Note that while this template was updated to have similar functionality and be more consistent with the Wikipidea sintax, they aren't exactly the same.