From Wikipedia, the free encyclopedia
တမ်းပလိတ်:Template doc page viewed directly
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.
Only required parameters and colwidth included.
{{Navbox with columns |name = {{subst:PAGENAME}} |title = |colwidth = <!--(to set a default width for each column, preferably in a proportional unit such as 'em'*)--> |col1 = |col2 = }}
Required parameters in bold. Parameters marked with a cross† 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}}.
collapsed
, uncollapsed
, plain
, off
, and the default autocollapse
. See {{Navbox}} for more information.plain
, off
, and the default value of blank. See {{Navbox}} for more information.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.background:color
(background defaults to NavHead default).background:color
per titlestyle above.colwidth = 15em
colwidth = 25%
fullwidth = true
col1
is required. There can be a maximum of 20 columns.col1headercolspan = 3
, then leave col2header
and col3header
blank.col1footercolspan = 3
, then leave col2footer
and col3footer
blank.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.
[swap, even, odd, off]
{{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/> {{CAM}}<br/> {{IND}} |col2 = {{IDN}}<br/> {{JPN}}<br/> {{LAO}}<br/> {{MAS}} |col3 = {{MYA}}<br/> {{NZL}}<br/> {{CHN-PRC}}<br/> {{PHI}} |col4width=17em |col4 = {{SIN}}<br/> {{KOR}}<br/> {{THA}}<br/> {{VIE}} |below = '''Potential future members'''{{spaces|6}}{{TLS}}{{spaces|3}}{{RUS}} }}
{{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) }}
The gray background for the columns is added for illustration only.
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.
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.
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.
This example shows how one can nest multiple {{Navbox with columns}} templates to get the right look. Edit this section to view the code. There is a main {{Navbox with columns}} and two additional {{Navbox with columns}} templates, with the "child" option set (see code).
This example shows {{Navbox}}, {{Navbox with collapsible groups}} and {{Navbox with columns}} all working together. Press the edit button for the section to view the code. Note that each of the child navboxes has the first parameter set to child
collapsible | Header color | Image | Groups | Style (body) parameter/s | Examples | |
---|---|---|---|---|---|---|
{{Navbox}} | collapsible | navbox | Left/right of body | Yes | Yes | {{USCongress}}, {{Solar System}} |
{{Navbox with columns}} | collapsible | navbox | Left/right of columns | No | Yes | {{Current U.S. Senators}}, {{Czech lands}} |
{{Navbox with collapsible groups}} | collapsible | navbox | Left/right of body and/or in each list | Yes | Yes | {{University of Michigan}}, {{Scouting}} |
Type | CSS classes | Javascript | Collapses when | Custom initial state | Nesting |
---|---|---|---|---|---|
Collapsible tables | collapsible | Defined in Common.js | 2 or more autocollapse on page | Yes | Yes |
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.