Template:Navbox with columns: Difference between revisions

From MC Public Wiki
Jump to navigation Jump to search
No edit summary
m (test)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
<!--
{{Navbox suite}}
A navigation box that presents its content in columns. Originally intended to provide a relatively straightforward means to align links prefixed by flag icons, e.g. in templates offering links to country articles.


== Basic syntax ==
Please do not edit without discussion first as this is a "VERY complex" template.
Only required parameters and ''colwidth'' included.


<pre style="overflow:auto;">
-->{{Navbox
{{Navbox with columns
|name = {{{name|}}}
|name       = {{subst:PAGENAME}}
|navbar = {{{navbar|}}}
|title      =  
|state = {{{state|}}}
|titleclass =  
|border = {{{border|{{{1|}}}}}}
|bodyclass  =
|colwidth = <!--(to set a default width for each column,
                  preferably in a proportional unit such as 'em'*)-->
|col1  =
|col2  =
}}
</pre>
<div style="line-height:1.35em; font-size:90%;">* See [[Em (typography)]]. Using proportional units means the template should still be displayed correctly across a range of browser font-sizes. If ''colwidth'' not specified, a default 10em is used.</div>


== Parameters ==
|title = {{{title|}}}
=== Setup parameters ===
|above = {{{above|}}}
:;''name''<ref name="common">Parameters marked with a footnote '''<sup>[1]</sup>''' are parameters in common with the sister templates {{tl|Navbox}} and {{tl|Navbox with collapsible groups}}. A much more complete description of those parameters is available at {{tl|Navbox}}.</ref>
|below = {{{below|}}}
::The name of the template. The name of this template, for example, is "Navbox with columns".
|image = {{{image|}}}
|imageleft = {{{imageleft|}}}


:;''state''<ref name="common"/>
|bodyclass = {{{bodyclass|}}}
::Possible values are <code>collapsed</code>, <code>uncollapsed</code>, <code>plain</code>, <code>off</code>, and the default <code>autocollapse</code>.  See {{tl|Navbox}} for more information.
|titleclass = {{{titleclass|}}}
|aboveclass = {{{aboveclass|}}}
|belowclass = {{{belowclass|}}}
|groupclass = {{{groupclass|}}}
|listclass = {{{listclass|}}}


:;''navbar''<ref name="common"/>
|style = {{{style|}}}{{{bodystyle|}}}
::Possible values are <code>plain</code>, <code>off</code>, and the default value of blank.  See {{tl|Navbox}} for more information.
|basestyle = {{{basestyle|}}}
|titlestyle = {{{titlestyle|}}}
|abovestyle = {{{abovestyle|}}}
|belowstyle = {{{belowstyle|}}}
|imagestyle = {{{imagestyle|}}}
|imageleftstyle = {{{imageleftstyle|}}}
|list1padding = 0px;


:;''border''<ref name="common"/>
|list1 = <!--
::Possible values are <code>child</code>, <code>none</code>, and the default value of blank. Set to <code>child</code> if you wish to use the navbox inside of another navbox; with this option, the child navbox is borderless and fits snuggly inside of its parent navbox.  The parent navbox may be the list area of {{tl|Navbox}}, a columns of another {{tl|Navbox with columns}}, or a section of {{tl|Navbox with collapsible groups}}.  See {{tl|Navbox}} for more information and examples.
--><table cellspacing="0" class="navbox-columns-table" style="text-align:left;<!--
  -->{{#if:{{{col1header|}}}{{{fullwidth|}}}|width:100%;<!--
-->|width:auto; margin-left:auto; margin-right:auto;}}{{{coltablestyle|}}}"><!--


===Basic data parameters===
:;'''''title'''''<ref name="common"/>
::The title of the template, displayed centered in the titlebar at the top of the template.


:;''above''<ref name="common"/>
--- Header row ---
::Text or other elements to appear above the columns.


:;''image''<ref name="common"/>
-->{{#if:{{{col1header|}}}|<tr><!--
::Image to the right of all of the columns.


:;''imageleft''<ref name="common"/>
--><td class="navbox-abovebelow" <!--
::Image to the left of all of the columns.
-->colspan={{{col1headercolspan|1}}} style="<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col1headerstyle|}}}">{{{col1header}}}</td><!--


:;''below''<ref name="common"/>
-->{{#if:{{{col2header|}}}|<td class="navbox-abovebelow" <!--
::Text or other elements to appear below the columns.
-->colspan={{{col2headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col2headerstyle|}}}">{{{col2header}}}</td>}}<!--


===Style parameters===
-->{{#if:{{{col3header|}}}|<td class="navbox-abovebelow" <!--
:;''style''<ref name="common"/>
-->colspan={{{col3headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
::CSS style/s to apply to the template's body (i.e. including space not used by columns)
-->font-weight:bold;{{{colheaderstyle|}}}{{{col3headerstyle|}}}">{{{col3header}}}</td>}}<!--


:;''titlestyle''<ref name="common"/>
-->{{#if:{{{col4header|}}}|<td class="navbox-abovebelow" <!--
::[[Wikipedia:CSS|CSS]] style/s to apply to titlebar; usually <code>background:''color''</code> (background defaults to [[Wikipedia:NavFrame|NavHead]] default).
-->colspan={{{col4headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col4headerstyle|}}}">{{{col4header}}}</td>}}<!--


:;''abovestyle''<ref name="common"/>
-->{{#if:{{{col5header|}}}|<td class="navbox-abovebelow" <!--
:;''belowstyle''<ref name="common"/>
-->colspan={{{col5headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
::CSS style/s to apply to the ''above'' and ''below'' parameters, respectively.
-->font-weight:bold;{{{colheaderstyle|}}}{{{col5headerstyle|}}}">{{{col5header}}}</td>}}<!--


:;''basestyle''<ref name="common"/>
-->{{#if:{{{col6header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply to the ''title'', ''above'', and ''below'', parameters, all at the same time.
-->colspan={{{col6headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col6headerstyle|}}}">{{{col6header}}}</td>}}<!--


:;''imagestyle''<ref name="common"/>
-->{{#if:{{{col7header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply to the ''image'' parameter.
-->colspan={{{col7headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col7headerstyle|}}}">{{{col7header}}}</td>}}<!--


:;''imageleftstyle''<ref name="common"/>
-->{{#if:{{{col8header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply to the ''imageleft'' parameter
-->colspan={{{col8headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col8headerstyle|}}}">{{{col8header}}}</td>}}<!--


:;''colstyle''
-->{{#if:{{{col9header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply across all columns; if used, usually <code>background:''color''</code> per ''titlestyle'' above.
-->colspan={{{col9headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col9headerstyle|}}}">{{{col9header}}}</td>}}<!--


:;''oddcolstyle''
-->{{#if:{{{col10header|}}}|<td class="navbox-abovebelow" <!--
:;''evencolstyle''
-->colspan={{{col10headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
::CSS style/s to apply to all odd/even-numbered columns, respectively.
-->font-weight:bold;{{{colheaderstyle|}}}{{{col10headerstyle|}}}">{{{col10header}}}</td>}}<!--


:;''col<sub>n</sub>style''
-->{{#if:{{{col11header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply to the n<sup>th</sup> column only.
-->colspan={{{col11headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col11headerstyle|}}}">{{{col11header}}}</td>}}<!--


:;''colheaderstyle''
-->{{#if:{{{col12header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply to all column headers.
-->colspan={{{col12headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col12headerstyle|}}}">{{{col12header}}}</td>}}<!--


:;''col<sub>n</sub>headerstyle''
-->{{#if:{{{col13header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply to the n<sup>th</sup> column header.
-->colspan={{{col13headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col13headerstyle|}}}">{{{col13header}}}</td>}}<!--


:;''col<sub>n</sub>footerstyle''
-->{{#if:{{{col14header|}}}|<td class="navbox-abovebelow" <!--
::CSS style/s to apply to the n<sup>th</sup> column footer cell.
-->colspan={{{col14headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col14headerstyle|}}}">{{{col14header}}}</td>}}<!--


===Columns parameters===
-->{{#if:{{{col15header|}}}|<td class="navbox-abovebelow" <!--
:;''colwidth''
-->colspan={{{col15headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
::Width, preferably in a proportional unit such as '[[Em (typography)|em]]', or as a percentage, used for each column whose width not specified by ''colNwidth'' below. Defaults to 10em.  Examples:
-->font-weight:bold;{{{colheaderstyle|}}}{{{col15headerstyle|}}}">{{{col15header}}}</td>}}<!--
:::<code>colwidth = 15em</code>
:::<code>colwidth = 25%</code>


:;''fullwidth''
-->{{#if:{{{col16header|}}}|<td class="navbox-abovebelow" <!--
::If set to anything, then the total width of the columns are scaled linearly to make the sum of the widths 100%. A rather advanced parameter, this usually need not be used and should be left blank.  If a colheader or colfooter is used, then fullwidth is used automatically.  Example:
  -->colspan={{{col16headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
:::<code>fullwidth = true</code>
-->font-weight:bold;{{{colheaderstyle|}}}{{{col16headerstyle|}}}">{{{col16header}}}</td>}}<!--


:;''padding''
-->{{#if:{{{col17header|}}}|<td class="navbox-abovebelow" <!--
::Padding before first column, preferably in a proportional unit. Defaults to 5em.  Padding is disabled by setting it to 0 (or 0em, or 0%).
-->colspan={{{col17headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col17headerstyle|}}}">{{{col17header}}}</td>}}<!--


:;''col<sub>n</sub>width''
-->{{#if:{{{col18header|}}}|<td class="navbox-abovebelow" <!--
::The n<sup>th</sup> column's width (overrides ''colwidth'' above).
-->colspan={{{col18headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col18headerstyle|}}}">{{{col18header}}}</td>}}<!--


:;'''''col<sub>n</sub>'''''
-->{{#if:{{{col19header|}}}|<td class="navbox-abovebelow" <!--
::The content of the n<sup>th</sup> column.  If any columns are used, then <code>col1</code> is required.  There can be a maximum of 20 columns.
-->colspan={{{col19headercolspan|1}}} style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col19headerstyle|}}}">{{{col19header}}}</td>}}<!--


:;''col<sub>n</sub>header''
-->{{#if:{{{col20header|}}}|<td class="navbox-abovebelow" <!--
::A header cell for the n<sup>th</sup> column that appears above the column.  See below for examples.
-->style="border-left:2px solid #fdfdfd;<!--
-->font-weight:bold;{{{colheaderstyle|}}}{{{col20headerstyle|}}}">{{{col20header}}}</td>}}<!--


:;''col<sub>n</sub>footer
--></tr>}}<!--
::A footer cell that appears below the n<sup>th</sup> column.


:;''col<sub>n</sub>headercolspan
::A number specifying how many columns the n<sup>th</sup> column header should span.  It defaults to 1.  If it is greater than one, then do not specify column headers that it covers.  For example, if <code>col1headercolspan = 3</code>, then leave <code>col2header</code> and <code>col3header</code> blank.


:;''col<sub>n</sub>footercolspan
--- Main columns---
::A number specifying how many columns the n<sup>th</sup> column footer should span.  It defaults to 1.  If it is greater than one, then do not specify column footers that it covers.  For example, if <code>col1footercolspan = 3</code>, then leave <code>col2footer</code> and <code>col3footer</code> blank.


===Additional groups/lists===
-->{{#if:{{{col1|}}}|{{#if:{{{col1header|}}}|<tr style="height:2px;"><td></td></tr>}}<!--
You may wish to add a few extra groups and/or lists below the columns.  The following parameters are given to provide such functionality.  See {{tl|Navbox}} for a more complete description of how they work, and for more examples.


:;''group<sub>n</sub>''<ref name="common"/>
--><tr style="vertical-align:top;"><!--
::Allows up to 6 additional groups to go along with the lists below the columns.
-->{{#if:{{{col1header|}}}{{{col1footer|}}}{{{fullwidth|}}}|<!--
-->|{{#switch:{{{padding|}}}|off|0|0em|0px|0%|0;|0em;|0px;|0%;=<!--
-->|#default=<td style="width:{{{padding|5em}}};">&nbsp;&nbsp;&nbsp;</td>}}}}<!--


:;''list<sub>n</sub>''<ref name="common"/>
--><td style="padding:0px;<!--
::Allows up to 6 additional lists below the columns.
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col1style|}}};width:{{{col1width|{{{colwidth|10em}}}}}};"><div>
{{{col1}}}
</div></td>}}<!--


:;''groupstyle<ref name="common"/>
-->{{#if:{{{col2|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
::The general CSS style/s for the groups.
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col2style|}}};width:{{{col2width|{{{colwidth|10em}}}}}};"><div>
{{{col2}}}
</div></td>}}<!--


:;''group<sub>n</sub>''style<sup>†</sup>
-->{{#if:{{{col3|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
::CSS style/s for the n<sup>th</sup> group parameter.<ref name="common"/>
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col3style|}}};width:{{{col3width|{{{colwidth|10em}}}}}};"><div>
:;''liststyle''<ref name="common"/>
{{{col3}}}
::The general CSS style/s for the lists.
</div></td>}}<!--


:;''list<sub>n</sub>style''
-->{{#if:{{{col4|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
::CSS style/s for the n<sup>th</sup> list parameter.
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col4style|}}};width:{{{col4width|{{{colwidth|10em}}}}}};"><div>
{{{col4}}}
</div></td>}}<!--


:;''listpadding''<ref name="common"/>
-->{{#if:{{{col5|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
::Amount of padding to have in each list cell.
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col5style|}}};width:{{{col5width|{{{colwidth|10em}}}}}};"><div>
{{{col5}}}
</div></td>}}<!--


:; ''oddstyle''
-->{{#if:{{{col6|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
:; ''evenstyle''
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col6style|}}};width:{{{col6width|{{{colwidth|10em}}}}}};"><div>
::Applies to odd/even list numbers.  Overrules styles defined by ''liststyle''.  The default behavior is to add striped colors (white and gray) to odd/even rows, respectively, in order to improve readability.  These should not be changed except in extraordinary circumstances.
{{{col6}}}
</div></td>}}<!--


:; ''evenodd'' <span style="font-weight:normal;"><code>[swap, even, odd, off]</code></span>
-->{{#if:{{{col7|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
::See {{tl|Navbox}} for description.
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col7style|}}};width:{{{col7width|{{{colwidth|10em}}}}}};"><div>
{{{col7}}}
</div></td>}}<!--


=== Microformats ===
-->{{#if:{{{col8|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
;bodyclass : This parameter is inserted into the "class" attribute for the infobox as a whole.
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col8style|}}};width:{{{col8width|{{{colwidth|10em}}}}}};"><div>
;titleclass : This parameter is inserted into the "class" attribute for the infobox's title caption.
{{{col8}}}
</div></td>}}<!--


This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a navbox as containing [[hCard]] information about a person, for example, add the following parameter:
-->{{#if:{{{col9|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col9style|}}};width:{{{col9width|{{{colwidth|10em}}}}}};"><div>
{{{col9}}}
</div></td>}}<!--


<pre>
-->{{#if:{{{col10|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
|bodyclass = vcard
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col10style|}}};width:{{{col10width|{{{colwidth|10em}}}}}};"><div>
</pre>
{{{col10}}}
</div></td>}}<!--


''and''
-->{{#if:{{{col11|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col11style|}}};width:{{{col11width|{{{colwidth|10em}}}}}};"><div>
{{{col11}}}
</div></td>}}<!--


<pre>
-->{{#if:{{{col12|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
|titleclass = fn
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col12style|}}};width:{{{col12width|{{{colwidth|10em}}}}}};"><div>
</pre>
{{{col12}}}
</div></td>}}<!--


''or'' (for example):
-->{{#if:{{{col13|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col13style|}}};width:{{{col13width|{{{colwidth|10em}}}}}};"><div>
{{{col13}}}
</div></td>}}<!--


<pre><nowiki>
-->{{#if:{{{col14|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
|title = The books of <span class="fn">[[Iain Banks]]</span>
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col14style|}}};width:{{{col14width|{{{colwidth|10em}}}}}};"><div>
</nowiki></pre>
{{{col14}}}
</div></td>}}<!--


...and so forth.
-->{{#if:{{{col15|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col15style|}}};width:{{{col15width|{{{colwidth|10em}}}}}};"><div>
{{{col15}}}
</div></td>}}<!--


See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general.
-->{{#if:{{{col16|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col16style|}}};width:{{{col16width|{{{colwidth|10em}}}}}};"><div>
{{{col16}}}
</div></td>}}<!--


== Examples ==
-->{{#if:{{{col17|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
===Basic example===
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col17style|}}};width:{{{col17width|{{{colwidth|10em}}}}}};"><div>
<pre style="overflow:scroll;">
{{{col17}}}
{{Navbox with columns
</div></td>}}<!--
|name    = East Asia Summit (EAS)
|title  = Member states of the [[East Asia Summit|East Asia Summit (EAS)]]
|width  = 18.25em
|padding = 10em


|above = ''This is where the <nowiki>{{{above}}}</nowiki> would appear.''
-->{{#if:{{{col18|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col18style|}}};width:{{{col18width|{{{colwidth|10em}}}}}};"><div>
{{{col18}}}
</div></td>}}<!--


|col1 = {{AUS}}<br> {{BRU}}<br> {{flag|CHN|name=PR China}}<br> {{CAM}}
-->{{#if:{{{col19|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
|col2 = {{IND}}<br> {{IDN}}<br> {{JPN}}<br> {{LAO}}
-->{{{colstyle|}}};{{{oddcolstyle|}}};{{{col19style|}}};width:{{{col19width|{{{colwidth|10em}}}}}};"><div>
|col3 = {{MAS}}<br> {{MMR}}<br> {{NZL}}<br> {{PHI}}
{{{col19}}}
|col4width = 17em
</div></td>}}<!--
|col4 = {{SIN}}<br> {{KOR}}<br> {{THA}}<br> {{VIE}}


|below = '''Potential future members'''{{spaces|6}}{{TLS}}{{spaces|3}}{{RUS}}
-->{{#if:{{{col20|}}}|<td style="border-left:2px solid #fdfdfd;padding:0px;<!--
}}
-->{{{colstyle|}}};{{{evencolstyle|}}};{{{col20style|}}};width:{{{col20width|{{{colwidth|10em}}}}}};"><div>
</pre>
{{{col20}}}
{{Navbox with columns
</div></td>}}<!--
|name    = East Asia Summit (EAS)
|state  = uncollapsed
|title  = Member states of the [[East Asia Summit|East Asia Summit (EAS)]]
|width  = 18.25em
|padding = 10em


|above = ''This is where the <nowiki>{{{above}}}</nowiki> parameter would appear.''


|col1 = {{AUS}}<br> {{BRU}}<br> {{flag|CHN|name=PR China}}<br> {{CAM}}
|col2 = {{IND}}<br> {{IDN}}<br> {{JPN}}<br> {{LAO}}
|col3 = {{MAS}}<br> {{MMR}}<br> {{NZL}}<br> {{PHI}}
|col4width = 17em
|col4 = {{SIN}}<br> {{KOR}}<br> {{THA}}<br> {{VIE}}


|below = '''Potential future members'''{{spaces|6}}{{TLS}}{{spaces|3}}{{RUS}}
--- Footer row ---
}}


===Example with percentage widths===
-->{{#if:{{{col1footer|}}}|<!--
<pre style="overflow:scroll;">
-->{{#if:{{{col1|}}}{{{col1header|}}}|<tr style="height:2px"><td></td></tr>}}<tr><!--
{{Navbox with columns
| name = Plastics
| title = [[Plastic]]s
| colwidth = 33%
| colstyle = text-align: center
| col1 = [[Polyethylene]] (PE)<br> [[Polyethylene terephthalate]] (PET or PETE)<br> [[Polyvinyl chloride]] (PVC)<br> [[Polyvinylidene chloride]] (PVDC)<br> [[Polylactic acid]] (PLA)
| col2 = [[Polypropylene]] (PP)<br> [[Polyamide]] (PA)<br> [[Polycarbonate]] (PC)<br> [[Polytetrafluoroethylene]] (PTFE)<br> [[Polyurethane]] (PU)
| col3 = [[Polystyrene]] (PS)<br> [[Polyester]]<br> [[Acrylonitrile butadiene styrene]] (ABS)<br> [[Acrylic glass|Polymethyl methacrylate]] (PMMA)<br> [[Polyoxymethylene]] (POM)
}}
</pre>
{{Navbox with columns
| name = Plastics
| title = [[Plastic]]s
| state = uncollapsed
| cols = 3
| colwidth = 33%
| colstyle = text-align: center
| col1 = [[Polyethylene]] (PE)<br> [[Polyethylene terephthalate]] (PET or PETE)<br> [[Polyvinyl chloride]] (PVC)<br> [[Polyvinylidene chloride]] (PVDC)<br> [[Polylactic acid]] (PLA)
| col2 = [[Polypropylene]] (PP)<br> [[Polyamide]] (PA)<br> [[Polycarbonate]] (PC)<br> [[Polytetrafluoroethylene]] (PTFE)<br> [[Polyurethane]] (PU)
| col3 = [[Polystyrene]] (PS)<br> [[Polyester]]<br> [[Acrylonitrile butadiene styrene]] (ABS)<br> [[Acrylic glass|Polymethyl methacrylate]] (PMMA)<br> [[Polyoxymethylene]] (POM)
}}


===Example with col<sub>n</sub>header and col<sub>n</sub>footer===
--><td class="navbox-abovebelow" colspan={{{col1footercolspan|1}}} style="<!--
The gray background for the columns is added for illustration only.
-->font-weight:bold;{{{colfooterstyle|}}};{{{col1footerstyle|}}}">{{{col1footer}}}</td><!--
{{Navbox with columns
|name = Navbox with columns/doc
|state = uncollapsed
|title = col<sub>n</sub>header and col<sub>n</sub>footer example


|colstyle = text-align:center;background:silver;
-->{{#if:{{{col2footer|}}}|<td class="navbox-abovebelow" colspan={{{col2footercolspan|1}}} style="<!--
|colwidth = 25%
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col2footerstyle|}}}">{{{col2footer}}}</td>}}<!--


|col1header = col1header
-->{{#if:{{{col3footer|}}}|<td class="navbox-abovebelow" colspan={{{col3footercolspan|1}}} style="<!--
|col2header = col2header
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col3footerstyle|}}}">{{{col3footer}}}</td>}}<!--
|col3header = col3header
|col4header = col4header


|col1 = col1
-->{{#if:{{{col4footer|}}}|<td class="navbox-abovebelow" colspan={{{col4footercolspan|1}}} style="<!--
|col2 = col2
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col4footerstyle|}}}">{{{col4footer}}}</td>}}<!--
|col3 = col3
|col4 = col4


|col1footer = col1footer
-->{{#if:{{{col5footer|}}}|<td class="navbox-abovebelow" colspan={{{col5footercolspan|1}}} style="<!--
|col2footer = col2footer
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col5footerstyle|}}}">{{{col5footer}}}</td>}}<!--
|col3footer = col3footer
|col4footer = col4footer


}}
-->{{#if:{{{col6footer|}}}|<td class="navbox-abovebelow" colspan={{{col6footercolspan|1}}} style="<!--
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col6footerstyle|}}}">{{{col6footer}}}</td>}}<!--


===Example with col<sub>n</sub>header using col<sub>n</sub>headercolspan===
-->{{#if:{{{col7footer|}}}|<td class="navbox-abovebelow" colspan={{{col7footercolspan|1}}} style="<!--
The gray background for the columns is added for illustration only. This example shows the col<sub>n</sub>headercolspan parameter being used, but you may also use col<sub>n</sub>footercolspan to adjust the span of the footer cells.
  -->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col7footerstyle|}}}">{{{col7footer}}}</td>}}<!--
{{Navbox with columns
|name = Navbox with columns/doc
|state = uncollapsed
|title = col<sub>n</sub>header with col<sub>n</sub>colspan example


|colstyle = text-align:center;background:silver;
-->{{#if:{{{col8footer|}}}|<td class="navbox-abovebelow" colspan={{{col8footercolspan|1}}} style="<!--
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col8footerstyle|}}}">{{{col8footer}}}</td>}}<!--


|col1header = col1header
-->{{#if:{{{col9footer|}}}|<td class="navbox-abovebelow" colspan={{{col9footercolspan|1}}} style="<!--
|col2header = col2header (colspan=2)
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col9footerstyle|}}}">{{{col9footer}}}</td>}}<!--
|col4header = col4header
|col5header = col5header (colspan=3)


|col2headercolspan = 2
-->{{#if:{{{col10footer|}}}|<td class="navbox-abovebelow" colspan={{{col10footercolspan|1}}} style="<!--
|col5headercolspan = 3
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col10footerstyle|}}}">{{{col10footer}}}</td>}}<!--


|col1 = col1
-->{{#if:{{{col11footer|}}}|<td class="navbox-abovebelow" colspan={{{col11footercolspan|1}}} style="<!--
|col2 = col2
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col11footerstyle|}}}">{{{col11footer}}}</td>}}<!--
|col3 = col3
|col4 = col4
|col5 = col5
|col6 = col6
|col7 = col7
}}


===Example to illustrate most fields===
-->{{#if:{{{col12footer|}}}|<td class="navbox-abovebelow" colspan={{{col12footercolspan|1}}} style="<!--
The gray background and centered text for the columns is for illustration only. The columns default to an off-white background and left text alignment.  This example shows how you can use up to six additional groups/lists after the columns.
  -->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col12footerstyle|}}}">{{{col12footer}}}</td>}}<!--


{{Navbox with columns
-->{{#if:{{{col13footer|}}}|<td class="navbox-abovebelow" colspan={{{col13footercolspan|1}}} style="<!--
|name = Navbox with columns/doc
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col13footerstyle|}}}">{{{col13footer}}}</td>}}<!--
|state = uncollapsed
|title = Example to illustrate most fields
|colstyle = text-align:center;background:silver;


|col1 = col1
-->{{#if:{{{col14footer|}}}|<td class="navbox-abovebelow" colspan={{{col14footercolspan|1}}} style="<!--
|col2 = col2
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col14footerstyle|}}}">{{{col14footer}}}</td>}}<!--
|col3 = col3
|col4 = col4
|col5 = col5


|col1header = col1header
-->{{#if:{{{col15footer|}}}|<td class="navbox-abovebelow" colspan={{{col15footercolspan|1}}} style="<!--
|col2header = col2header
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col15footerstyle|}}}">{{{col15footer}}}</td>}}<!--
|col3header = col3header
|col4header = col4header
|col5header = col5header


|col1footer = col1footer
-->{{#if:{{{col16footer|}}}|<td class="navbox-abovebelow" colspan={{{col16footercolspan|1}}} style="<!--
|col2footer = col2footer
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col16footerstyle|}}}">{{{col16footer}}}</td>}}<!--
|col3footer = col3footer
|col4footer = col4footer
|col5footer = col5footer


|group1 = group1
-->{{#if:{{{col17footer|}}}|<td class="navbox-abovebelow" colspan={{{col17footercolspan|1}}} style="<!--
|group2 = group2
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col17footerstyle|}}}">{{{col17footer}}}</td>}}<!--
|group3 = group3
|group4 = group4
|group5 = group5
|group6 = group6


|list1 = list1
-->{{#if:{{{col18footer|}}}|<td class="navbox-abovebelow" colspan={{{col18footercolspan|1}}} style="<!--
|list2 = list2
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col18footerstyle|}}}">{{{col18footer}}}</td>}}<!--
|list3 = list3
|list4 = list4
|list5 = list5
|list6 = list6


|above = above
-->{{#if:{{{col19footer|}}}|<td class="navbox-abovebelow" colspan={{{col19footercolspan|1}}} style="<!--
|below = below
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col19footerstyle|}}}">{{{col19footer}}}</td>}}<!--
}}


==Using child navboxes==
-->{{#if:{{{col20footer|}}}|<td class="navbox-abovebelow" style="<!--
All three types of navbox templates, namely {{tl|Navbox}}, {{tl|Navbox with columns}}, and {{tl|Navbox with collapsible groups}}, can be nested inside of one another using the <code>border</code> parameter (which is common to all three).  For complex templates, it may be necessary to use nesting to achieve a desired look.
-->border-left:2px solid #fdfdfd;font-weight:bold;{{{colfooterstyle|}}};{{{col20footerstyle|}}}">{{{col20footer}}}</td>}}<!--


===Nesting Navbox with columns in itself===
--></tr>}}<!--
This example shows how one can nest multiple {{tl|Navbox with columns}} templates to get the right look.  Edit this page to see the code.  There is a main {{tl|Navbox with columns}} and two additional {{tl|Navbox with columns}} templates, with the "child" option set (see code).
{{Navbox with columns
|name = Navbox with columns/doc
|state = uncollapsed
|title = Subgroups with nesting
|colstyle = text-align:center;background:silver;


|col1width = 33%
--></tr></table>
|col2width = 17%
|col3width = 33%
|col4width = 17%


|col1header = Col1Header
|col2header = Col2Header
|col3header = Col3Header
|col4header = Col4Header


|col1 = {{Navbox with columns|child
<!--  Allow a few additional groups/lists after columns  -->
  |colwidth = 50%
|liststyle = {{{liststyle|}}}
  |colstyle = text-align:center;background:silver;
|list1style = background:transparent;color:inherit;
|list3style = {{{list1style|}}}
|list4style = {{{list2style|}}}
|list5style = {{{list3style|}}}
|list6style = {{{list3style|}}}
|list7style = {{{list5style|}}}
|list8style = {{{list6style|}}}


  |col1header = Col1.1Header
|list3 = {{{list1|}}}
  |col2header = Col1.2Header
|list4 = {{{list2|}}}
|list5 = {{{list3|}}}
|list6 = {{{list4|}}}
|list7 = {{{list5|}}}
|list8 = {{{list6|}}}


  |col1 = Col1.1
|groupstyle = {{{groupstyle|}}}
  |col2 = Col1.2
|group3style = {{{group1style|}}}
}}
|group4style = {{{group2style|}}}
|group5style = {{{group3style|}}}
|group6style = {{{group4style|}}}
|group7style = {{{group5style|}}}
|group8style = {{{group6style|}}}


|col2 = Col2
|group3 = {{{group1|}}}
|group4 = {{{group2|}}}
|group5 = {{{group3|}}}
|group6 = {{{group4|}}}
|group7 = {{{group5|}}}
|group8 = {{{group6|}}}


|col3 = {{Navbox with columns|child
|oddstyle = {{{oddstyle|}}}
  |colwidth = 33%
|evenstyle = {{{evenstyle|}}}
  |colstyle = text-align:center;background:silver;
|{{#if:{{{evenodd|}}}|evenodd|void}} = {{{evenodd|}}}


  |col1header = Col3.1Header
}}<noinclude>
  |col2header = Col3.2Header
{{documentation}}
  |col3header = Col3.3Header


  |col1 = Col3.1
<!---Please add metadata to the <includeonly> section at the bottom of the /doc subpage--->
  |col2 = Col3.2
</noinclude>
  |col3 = Col3.3
}}
 
|col4 = Col4
}}
 
===Nesting other Navbox forms===
This example shows {{tl|Navbox}}, {{tl|Navbox with collapsible groups}} and {{tl|Navbox with columns}} all working together.  Edit this page to see the code.  Note that each of the child navboxes has the first parameter set to <code>child</code>.
{{Navbox with collapsible groups
|name = Navbox with collapsible groups
|title = Navbox, Navbox with columns, and Navbox with collapsible groups together
|selected = {{{1|}}}
 
|group1 = [[:Category:Scouting|The Scouting Movement]]
|abbr1  = movement
|list1  = [[Scouting]]{{·}}''[[Scouting for Boys]]''{{·}}[[Scout method]]{{·}}[[Scout Law]]{{·}}[[Scout Promise]]{{·}}[[Scout Motto]]{{·}}[[Wood Badge]]{{·}}[[Age groups in Scouting and Guiding]]{{·}}[[Cub Scout]]{{·}}[[Boy Scout]]{{·}}[[Rover Scout]]{{·}}[[Brownie (Girl Guides)|Brownie]]{{·}}[[Girl Guiding and Girl Scouting]]{{·}}[[Ranger (Girl Guide)]]{{·}}[[Jamboree (Scouting)|Jamboree]]{{·}}[[Scout Leader]]{{·}}[[World Organization of the Scout Movement|WOSM]]{{·}}[[World Association of Girl Guides and Girl Scouts|WAGGGS]]{{·}}[[Non-aligned Scouting and Scout-like organisations|Non-aligned organisations]]{{·}}[[Scouting controversy and conflict]]{{·}}[[Scouting in popular culture]]{{·}}[[List of Scouts]]{{·}}[[List of highest awards in Scouting]]
 
|list2  = {{Navbox|child
|title      = [[French colonial empires|Former French colonies]] in [[Africa]] and the [[Indian Ocean]]
|titlestyle = background#
|groupstyle = background:lavender;
 
|group1 = [[Mahgreb]]
|list1  = [[French rule in Algeria|Algeria]]{{·}} [[French Morocco|Morocco]]&nbsp;<small>([[Arguin|Arguin Island]])</small>{{·}} [[History of Tunisia|Tunisia]]
 
|group2 = [[French West Africa]]
|list2  = [[History of Côte d'Ivoire#French Period|Côte d'Ivoire]]{{·}} [[French Dahomey|Dahomey]]{{·}} [[French Sudan]]{{·}} [[French Guinea|Guinea]]{{·}} [[History of Mauritania#French colonization and post-colonial history|Mauritania]]{{·}} [[History of Niger#Colonization|Niger]]{{·}} [[History of Senegal|Senegal]]{{·}} [[French Upper Volta|Upper Volta]]
 
|group3 = Togo
|list3  = [[French Togoland]]{{·}} [[James Island (The Gambia)|James Island]]
 
|group4 = [[French Equatorial Africa]]
|list4  = [[Colonial Chad|Chad]]{{·}} [[History of Gabon|Gabon]]{{·}} [[History of the Republic of the Congo|Middle Congo]]{{·}} [[Oubangui-Chari]]
 
|group5 = [[Comoros]]
|list5  = [[Anjouan]]{{·}} [[Grande Comore]]{{·}} [[Mohéli]]
 
|group6 = Southern Africa
|list6  = [[History of Djibouti#French interest|French Somaliland (Djibouti)]]{{·}} [[History of Madagascar#French control|Madagascar]]{{·}} [[Mauritius|Ile de France]]{{·}} [[Seychelles]]
}}
 
|group3 = [[Scouting in the United Kingdom]]
|abbr3  = Scouting
|list3  = [[The Scout Association]]{{·}}[[Girlguiding UK]]{{·}}[[Beaver Scouts]]{{·}}[[Cub Section (UK)]]{{·}}[[Venture Scout]]{{·}}[[Explorer Scouts]]{{·}}[[Brownie (Girl Guides)]]{{·}}[[Ranger (Girl Guide)]]{{·}}[[Rainbow (Girl Guides)]]{{·}}[[Scout Network]]{{·}}[[Chief Scout (United Kingdom)]]{{·}}[[Scout Counties]]{{·}}[[Scout District]]{{·}}[[Scout Section (UK)]]{{·}}[[Scout Activity Centre]]{{·}}[[Young Leaders (The Scout Association)|Young Leaders]]
 
|list4  = {{Navbox with columns|child
|title = Navbox with columns nested in itself
|colstyle = text-align:center;
 
|col1width = 33%
|col2width = 17%
|col3width = 33%
|col4width = 17%
 
|col1header = Col1Header
|col2header = Col2Header
|col3header = Col3Header
|col4header = Col4Header
 
|col1 = {{Navbox with columns|child
  |colwidth = 50%
  |colstyle = text-align:center;
 
  |col1header = Col1.1Header
  |col2header = Col1.2Header
 
  |col1 = Col1.1
  |col2 = Col1.2
}}
 
|col2 = Col2
 
|col3 = {{Navbox with columns|child
  |colwidth = 33%
  |colstyle = text-align:center;
 
  |col1header = Col3.1Header
  |col2header = Col3.2Header
  |col3header = Col3.3Header
 
  |col1 = Col3.1
  |col2 = Col3.2
  |col3 = Col3.3
}}
 
|col4 = Col4
}}
}}
 
==Footnote==
<references/>
 
== See also ==
{{Navigational templates}}
 
<includeonly>
<!--Categories-->
[[Category:Navigational boxes| ]]
 
<!--Other languages-->
[[ar:قالب:Navbox with columns]]
[[bn:টেমপ্লেট:Navbox with columns]]
[[bs:Šablon:Navkutija sa kolonama]]
[[ca:Plantilla:Navbox with columns]]
[[cs:Šablona:Navbox se sloupci]]
[[eo:Ŝablono:Navigilo kun kolumnoj]]
[[fr:Modèle:Méta palette de navigation avec colonnes]]
[[hy:Կաղապար:Սյունակներով նավարկման աղյուսակ]]
[[ko:틀:안내 다단]]
[[hsb:Předłoha:Nawitabela ze špaltami]]
[[ja:Template:Navbox with columns]]
[[ku:Şablon:Navbox with columns]]
[[mk:Шаблон:Navbox with columns]]
[[pl:Szablon:Navbox z kolumnami]]
[[pt:Predefinição:Navbox with columns]]
[[ro:Format:Casetă de navigare cu coloane]]
[[ru:Шаблон:Навигационная таблица с колонками]]
[[sv:Mall:Navbox with columns]]
[[uk:Шаблон:Navbox with columns]]
[[tr:Şablon:Dolaşım dikeç]]
[[vi:Tiêu bản:Navbox with columns]]
[[zh:Template:Navbox with columns]]
</includeonly>

Latest revision as of 16:46, 9 February 2012

Documentation icon Template documentation[view] [edit] [history] [purge]

A navigation box that presents its content in columns. Originally intended to provide a relatively straightforward means to align links prefixed by flag icons, e.g. in templates offering links to country articles.

Basic syntax

Only required parameters and colwidth included.

{{Navbox with columns
|name       = {{subst:PAGENAME}}
|title      = 
|titleclass = 
|bodyclass  = 
|colwidth =  <!--(to set a default width for each column,
                  preferably in a proportional unit such as 'em'*)-->
|col1  = 
|col2  = 
}}
* See Em (typography). Using proportional units means the template should still be displayed correctly across a range of browser font-sizes. If colwidth not specified, a default 10em is used.

Parameters

Setup parameters

name[1]
The name of the template. The name of this template, for example, is "Navbox with columns".
state[1]
Possible values are collapsed, uncollapsed, plain, off, and the default autocollapse. See {{Navbox}} for more information.
navbar[1]
Possible values are plain, off, and the default value of blank. See {{Navbox}} for more information.
border[1]
Possible values are child, none, and the default value of blank. Set to child if you wish to use the navbox inside of another navbox; with this option, the child navbox is borderless and fits snuggly inside of its parent navbox. The parent navbox may be the list area of {{Navbox}}, a columns of another {{Navbox with columns}}, or a section of {{Navbox with collapsible groups}}. See {{Navbox}} for more information and examples.

Basic data parameters

title[1]
The title of the template, displayed centered in the titlebar at the top of the template.
above[1]
Text or other elements to appear above the columns.
image[1]
Image to the right of all of the columns.
imageleft[1]
Image to the left of all of the columns.
below[1]
Text or other elements to appear below the columns.

Style parameters

style[1]
CSS style/s to apply to the template's body (i.e. including space not used by columns)
titlestyle[1]
CSS style/s to apply to titlebar; usually background:color (background defaults to NavHead default).
abovestyle[1]
belowstyle[1]
CSS style/s to apply to the above and below parameters, respectively.
basestyle[1]
CSS style/s to apply to the title, above, and below, parameters, all at the same time.
imagestyle[1]
CSS style/s to apply to the image parameter.
imageleftstyle[1]
CSS style/s to apply to the imageleft parameter
colstyle
CSS style/s to apply across all columns; if used, usually background:color per titlestyle above.
oddcolstyle
evencolstyle
CSS style/s to apply to all odd/even-numbered columns, respectively.
colnstyle
CSS style/s to apply to the nth column only.
colheaderstyle
CSS style/s to apply to all column headers.
colnheaderstyle
CSS style/s to apply to the nth column header.
colnfooterstyle
CSS style/s to apply to the nth column footer cell.

Columns parameters

colwidth
Width, preferably in a proportional unit such as 'em', or as a percentage, used for each column whose width not specified by colNwidth below. Defaults to 10em. Examples:
colwidth = 15em
colwidth = 25%
fullwidth
If set to anything, then the total width of the columns are scaled linearly to make the sum of the widths 100%. A rather advanced parameter, this usually need not be used and should be left blank. If a colheader or colfooter is used, then fullwidth is used automatically. Example:
fullwidth = true
padding
Padding before first column, preferably in a proportional unit. Defaults to 5em. Padding is disabled by setting it to 0 (or 0em, or 0%).
colnwidth
The nth column's width (overrides colwidth above).
coln
The content of the nth column. If any columns are used, then col1 is required. There can be a maximum of 20 columns.
colnheader
A header cell for the nth column that appears above the column. See below for examples.
colnfooter
A footer cell that appears below the nth column.
colnheadercolspan
A number specifying how many columns the nth column header should span. It defaults to 1. If it is greater than one, then do not specify column headers that it covers. For example, if col1headercolspan = 3, then leave col2header and col3header blank.
colnfootercolspan
A number specifying how many columns the nth column footer should span. It defaults to 1. If it is greater than one, then do not specify column footers that it covers. For example, if col1footercolspan = 3, then leave col2footer and col3footer blank.

Additional groups/lists

You may wish to add a few extra groups and/or lists below the columns. The following parameters are given to provide such functionality. See {{Navbox}} for a more complete description of how they work, and for more examples.

groupn[1]
Allows up to 6 additional groups to go along with the lists below the columns.
listn[1]
Allows up to 6 additional lists below the columns.
groupstyle[1]
The general CSS style/s for the groups.
groupnstyle
CSS style/s for the nth group parameter.[1]
liststyle[1]
The general CSS style/s for the lists.
listnstyle
CSS style/s for the nth list parameter.
listpadding[1]
Amount of padding to have in each list cell.
oddstyle
evenstyle
Applies to odd/even list numbers. Overrules styles defined by liststyle. The default behavior is to add striped colors (white and gray) to odd/even rows, respectively, in order to improve readability. These should not be changed except in extraordinary circumstances.
evenodd [swap, even, odd, off]
See {{Navbox}} for description.

Microformats

bodyclass
This parameter is inserted into the "class" attribute for the infobox as a whole.
titleclass
This parameter is inserted into the "class" attribute for the infobox's title caption.

This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a navbox as containing hCard information about a person, for example, add the following parameter:

|bodyclass = vcard

and

|titleclass = fn

or (for example):

|title = The books of <span class="fn">[[Iain Banks]]</span>

...and so forth.

See Wikipedia:WikiProject Microformats for more information on adding microformat information to Wikipedia, and microformat for more information on microformats in general.

Examples

Basic example

{{Navbox with columns
|name    = East Asia Summit (EAS)
|title   = Member states of the [[East Asia Summit|East Asia Summit (EAS)]]
|width   = 18.25em
|padding = 10em

|above = ''This is where the {{{above}}} would appear.''

|col1 = {{AUS}}<br> {{BRU}}<br> {{flag|CHN|name=PR China}}<br> {{CAM}}
|col2 = {{IND}}<br> {{IDN}}<br> {{JPN}}<br> {{LAO}}
|col3 = {{MAS}}<br> {{MMR}}<br> {{NZL}}<br> {{PHI}}
|col4width = 17em
|col4 = {{SIN}}<br> {{KOR}}<br> {{THA}}<br> {{VIE}}

|below = '''Potential future members'''{{spaces|6}}{{TLS}}{{spaces|3}}{{RUS}}
}}

Example with percentage widths

{{Navbox with columns
| name = Plastics
| title = [[Plastic]]s
| colwidth = 33%
| colstyle = text-align: center
| col1 = [[Polyethylene]] (PE)<br> [[Polyethylene terephthalate]] (PET or PETE)<br> [[Polyvinyl chloride]] (PVC)<br> [[Polyvinylidene chloride]] (PVDC)<br> [[Polylactic acid]] (PLA)
| col2 = [[Polypropylene]] (PP)<br> [[Polyamide]] (PA)<br> [[Polycarbonate]] (PC)<br> [[Polytetrafluoroethylene]] (PTFE)<br> [[Polyurethane]] (PU)
| col3 = [[Polystyrene]] (PS)<br> [[Polyester]]<br> [[Acrylonitrile butadiene styrene]] (ABS)<br> [[Acrylic glass|Polymethyl methacrylate]] (PMMA)<br> [[Polyoxymethylene]] (POM)
}}

Example with colnheader and colnfooter

The gray background for the columns is added for illustration only.

Example with colnheader using colnheadercolspan

The gray background for the columns is added for illustration only. This example shows the colnheadercolspan parameter being used, but you may also use colnfootercolspan to adjust the span of the footer cells.

Example to illustrate most fields

The gray background and centered text for the columns is for illustration only. The columns default to an off-white background and left text alignment. This example shows how you can use up to six additional groups/lists after the columns.

Using child navboxes

All three types of navbox templates, namely {{Navbox}}, {{Navbox with columns}}, and {{Navbox with collapsible groups}}, can be nested inside of one another using the border parameter (which is common to all three). For complex templates, it may be necessary to use nesting to achieve a desired look.

Nesting Navbox with columns in itself

This example shows how one can nest multiple {{Navbox with columns}} templates to get the right look. Edit this page to see the code. There is a main {{Navbox with columns}} and two additional {{Navbox with columns}} templates, with the "child" option set (see code).

Nesting other Navbox forms

This example shows {{Navbox}}, {{Navbox with collapsible groups}} and {{Navbox with columns}} all working together. Edit this page to see the code. Note that each of the child navboxes has the first parameter set to child. Template:Navbox with collapsible groups

Footnote

  1. 1.00 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 1.21 Parameters marked with a footnote [1] are parameters in common with the sister templates {{Navbox}} and {{Navbox with collapsible groups}}. A much more complete description of those parameters is available at {{Navbox}}.

See also

Template:Navigational templates

ar:قالب:Navbox with columns bn:টেমপ্লেট:Navbox with columns bs:Šablon:Navkutija sa kolonama ca:Plantilla:Navbox with columns cs:Šablona:Navbox se sloupci eo:Ŝablono:Navigilo kun kolumnoj fr:Modèle:Méta palette de navigation avec colonnes hy:Կաղապար:Սյունակներով նավարկման աղյուսակ ko:틀:안내 다단 hsb:Předłoha:Nawitabela ze špaltami ja:Template:Navbox with columns ku:Şablon:Navbox with columns mk:Шаблон:Navbox with columns pl:Szablon:Navbox z kolumnami pt:Predefinição:Navbox with columns ro:Format:Casetă de navigare cu coloane ru:Шаблон:Навигационная таблица с колонками sv:Mall:Navbox with columns uk:Шаблон:Navbox with columns tr:Şablon:Dolaşım dikeç vi:Tiêu bản:Navbox with columns zh:Template:Navbox with columns