Template:Navigation with columns
维基百科,自由的百科全书
{{{col1}}} | {{{col2}}} |
Version of {{Navigation}} that presents its content in columns. Originally intended to provide a straightforward means to align links prefixed by flag icons, e.g. in templates offering links to country articles.
[编辑] Parameters
Required parameters in bold.
name | The name of the template. The name of this template, for example, is "Navigation with columns". |
title | The title of the template, displayed centered in the titlebar at the top of the template. |
titlebkg | Background color of titlebar (defaults to NavHead default, currently #efefef). |
above | (or top) Text or other elements to appear above the columns. |
cols | The number of columns to be used (maximum 6, minimum 2). |
colsbkg | Background color for columns (defaults to transparent). |
width | Width, in pixels, used for each column. Don't include the "px" suffix. |
col1 | First column's content. |
col2 | Second column's content. |
col3 | Third column's content. |
... | ... |
col6 | Sixth and final column's content. |
below | (or bottom) Text or other elements to appear below the columns. |
cat | (or category) The category or categories to which a page including the template will become a member. |
[编辑] Blank syntax
Only required parameters included.
{{Navigation with columns |name = {{subst:PAGENAME}} |title = |cols = |width = <!--in pixels, without "px" suffix--> |col1 = |col2 = }}
[编辑] Example
[编辑] Code
{{Navigation with columns |name = (Countries bordering the Mediterranean Sea) |title = [[List of countries|Countries]] bordering the [[Mediterranean Sea]] |cols = 4 |width = 185 <!--185 pixels--> |above = ''(This is where the {{{above}}} or {{{top}}} parameter would appear.)'' |col1 = {{flagcountry|Albania}}<br/> {{flagcountry|Algeria}}<br/> {{flagcountry|Bosnia and Herzegovina}}<br/> {{flagcountry|Croatia}}<br/> {{flagcountry|Cyprus}}<br/> {{flagcountry|Egypt}} |col2 = {{flagcountry|France}}<br/> {{flagcountry|Greece}}<br/> {{flagcountry|Israel}}<br/> {{flagcountry|Italy}}<br/> {{flagcountry|Lebanon}} |col3 = {{flagcountry|Libya}}<br/> {{flagcountry|Malta}}<br/> {{flagcountry|Monaco}}<br/> {{flagcountry|Montenegro}}<br/> {{flagcountry|Morocco}} |col4 = {{flagcountry|Slovenia}}<br/> {{flagcountry|Spain}}<br/> {{flagcountry|Syria}}<br/> {{flagcountry|Tunisia}}<br/> {{flagcountry|Turkey}} |below = Dependent and other territories not included. }}
[编辑] Result
[编辑] Calculations used
┌--------------------------centered table-------------------------┐ columns: | (padding) | ┌-----------|-----{{cols}}----|-----------┐ | widths: | {{{width}}}/2 | {{{width}}} | {{{width}}} | ... | {{{width}}} |
[编辑] See also
縮放模式 | 標題顏色† | 圖像 | 群組 | 樣式參數 | 範例模板 | |
---|---|---|---|---|---|---|
{{Navigation}} | NavFrame | NavHead | 否 | 否 | 否 | {{OPEC}} |
{{Navigation with image}} | NavFrame | NavHead | 框內 左/右側 | 否 | 否 | {{Cetaceans}} |
{{Navigation with columns}} | NavFrame | NavHead | 否 | 否 | 否 | |
{{Dynamic navigation box}} | collapsible | navbox | 否 | 否 | 是 | {{AACO}} |
{{Dynamic navigation box with image}} | NavFrame | NavHead | 左上角 | 否 | 否 | {{SlovakPMs}} |
{{Navbox generic}} | collapsible | navbox | 框內右側 | 是 | 是 | {{台北市重要古蹟}} |
{{NavigationBox}} | 否 | navbox | 整體表格的右側 | 否 | 否 | {{上古天皇}} |
{{Commons:NavigationBox}} | 否 | #ccccff | 整體表格的右側 | 否 | 否 | |
{{Commons:Dynamic navigation box}} | NavFrame | #ccccff | 否 | 否 | 否 | |
{{Commons:Dynamic navigation box with image}} | NavFrame | NavHead | 左上角 | 否 | 否 | |
† header或title的背景顏色 is inherited from the class listed bellow. The templates have color parameters that override the default. |
類型 | CSS Classes | 何時會折疊 | Custom initial state | Nesting | Header color | 字體大小 |
---|---|---|---|---|---|---|
NavFrame div | NavFrame, NavHead, NavContent | 3個或以上 | 否 | 是 | #efefef | 95% |
Collapsible table | collapsible, navbox | 2個或以上 | 是 | 否 | #ccccff | 90% |
For the technically minded, see Common.css and Common.js. |