Lompat ke isi

Citakan:Navigation with columns/doc

Ti Wikipédia Sunda, énsiklopédi bébas

Version of {{Navigation}} 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

[édit sumber]

Only required parameters and width included.

{{Navigation with columns
|name  = {{subst:PAGENAME}}
|title = 
|cols  = (number of columns)
|width = (width of 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 width not specified, a default 10em is used.

Parameters

[édit sumber]

Required parameters in bold.

nameThe name of the template. The name of this template, for example, is "Navigation with columns".
titlestyleCSS style/s to apply to titlebar; usually background:color (background defaults to NavHead default).
titleThe title of the template, displayed centered in the titlebar at the top of the template.
bodystyleCSS style/s to apply to the template's body (i.e. including space not used by columns)
abovestyleCSS style/s to apply to the above parameter.
aboveText or other elements to appear above the columns.
colsThe number of columns to be used (maximum 10, minimum 2).
widthWidth, preferably in a proportional unit such as 'em', used for each column whose width not specified by colNwidth below. Defaults to 10em.
paddingPadding before first column, preferably in a proportional unit. Defaults to 5em.
colstyleCSS style/s to apply across all columns; if used, usually background:color per titlestyle above.
oddcolstyleCSS style/s to apply to all odd-numbered columns (again, if used, usually background:color).
evencolstyleCSS style/s to apply to all even-numbered columns (ditto).
col1widthFirst column's width (overrides width above).
col1styleCSS style/s to apply to the first column.
col1First column's content.
col2widthSecond column's width (overrides width above).
col2styleCSS style/s to apply to the second column.
col2Second column's content.
col3widthThird column's width (overrides width above).
col3styleCSS style/s to apply to the third column.
col3Third column's content.
............
col10widthTenth and final column's width (overrides width above).
col10styleCSS style/s to apply to the tenth and final column.
col10Tenth and final column's content.
belowstyleCSS style/s to apply to the below parameter.
belowText or other elements to appear below the columns.
categoryThe category or categories to which a page including the template will become a member. Avoid using, as such categories not shown in the code of a page transcluding the template.

Example

[édit sumber]
{{Navigation with columns
|name    = East Asia Summit (EAS)
|title   = Member states of the [[East Asia Summit|East Asia Summit (EAS)]]
|cols    = 4
|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}}

|belowstyle = padding-top:0.5em;
|below = '''Potential future members'''{{spaces|6}}{{TLS}}{{spaces|3}}{{RUS}}
}}

Result

[édit sumber]

See also

[édit sumber]
Navigation template comparison
collapsibleHeader color ImageGroupsStyle
parameter
Example
{{Navigation}} NavFrameNavHead HenteuHenteuHenteu{{OPEC}}
{{Navigation with image}} NavFrameNavHead Left/right of bodyHenteuHenteu{{HolmesNovels}}
{{Navigation with columns}} NavFrameNavHead HenteuHenteuHenteu
{{Dynamic navigation box}} collapsiblenavbox HenteuHenteuEnya{{CSUHeads}}
{{Dynamic navigation box with image}} NavFrameNavHead Upper leftHenteuHenteu{{SlovakPMs}}
{{Navbox generic}} collapsiblenavbox Right-hand sideEnyaEnya{{Dilbert}}
{{Navbox generic with image}} collapsiblenavbox Right-hand sideEnyaEnya{{Jewish life}}
{{NavigationBox}} Henteunavbox Right of title+bodyHenteuHenteu{{EPA}}
{{Commons:NavigationBox}} Henteu#ccccff Right of title+bodyHenteuHenteu
{{Commons:Dynamic navigation box}} NavFrame#ccccff HenteuHenteuHenteu
{{Commons:Dynamic navigation box with image}}  NavFrameNavHead Upper leftHenteuHenteu
The background color for the header or title is inherited from the class listed below. The templates have color parameters that override the default.
Collapsible attributes
Type CSS classes Collapses whenCustom
initial state
Nesting Header
color
Font size
NavFrame div NavFrame, NavHead, NavContent 3+ of the sameHenteuEnya #efefef95%
Collapsible table collapsible, navbox 2+ of the sameEnyaHenteu #ccccff90%

For the technically minded, see Common.css and Common.js.