Misplaced Pages

Template:Navigation/doc: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
< Template:Navigation Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 02:54, 16 December 2006 editChochopk (talk | contribs)Extended confirmed users24,497 edits Auto collapse logic← Previous edit Revision as of 03:56, 16 December 2006 edit undoChochopk (talk | contribs)Extended confirmed users24,497 edits default color is now efefefNext edit →
Line 18: Line 18:


===''Optional''=== ===''Optional''===
; color : Header color. Default is <span style="background-color: #eee;">#eee</span>. Use of this parameter is discouraged. Care/consensus needed when using this parameter as multiple navigational templates on one page using different titlebar colors is likely to look unpleasant. ; color : Header color. Default is <span style="background-color: #efefef;">#efefef</span>. Use of this parameter is discouraged. Care/consensus needed when using this parameter as multiple navigational templates on one page using different titlebar colors is likely to look unpleasant.
; cat (or category): The category or categories to which a page sporting the template will become a member. ; cat (or category): The category or categories to which a page sporting the template will become a member.



Revision as of 03:56, 16 December 2006

Template:Template doc page viewed directly {{Navigation/doc}} is a generic navigational template.

Blank

{{Navigation
| name  = {{subst:PAGENAME}}
| title = 
| body  = 
}}

Parameters

Mandatory

name (or templateName)
The name of the template, which is needed for the "view · talk · edit" links to work properly on all of the pages where the template is used on. You can enter {{subst:PAGENAME}} for this value as a shortcut.
title (or header)
Text that appears centered in the titlebar (the top bar). Usually this is the template's topic, i.e. a succinct description of the body contents.
body
The material contained by the template, usually a list or list of links. Use &#124; to separate links. It is not possible to include a pipe ("|") in the contents as this symbol is used to separate parameters. Format is inline.

Optional

color
Header color. Default is #efefef. Use of this parameter is discouraged. Care/consensus needed when using this parameter as multiple navigational templates on one page using different titlebar colors is likely to look unpleasant.
cat (or category)
The category or categories to which a page sporting the template will become a member.

Auto collapse logic

A navbox will start out collapsed if there are 4 or more tables on the same page that is implemented with NavFrame. For the technical minded, see MediaWiki:Common.js.

See also Misplaced Pages:NavFrame.

Example

Code

{{Navigation
| name  = {{subst:PAGENAME}}
| title = ] of ]
| cat   = ]<noinclude>] ]</noinclude>
| body  =
]{{·}}
]{{·}}
]{{·}}
]{{·}}
]{{·}}
]{{·}}
]{{·}}
]
}}

Result

Countries of Central Asia

See also

Navigation templates comparison
Template Collapsible Image Groups Style (body)
parameter/s
{{Navbox}} collapsible Left/right of body Yes Yes
{{Navbox with collapsible groups}} collapsible Left/right of body and/or in each list Yes Yes
{{Navbox with columns}} collapsible Left/right of columns No Yes
Collapsible attributes
Type CSS classes JavaScript Collapses when Custom
initial state
Nesting
Collapsible tables mw-collapsible jQuery.makeCollapsible 2 or more autocollapse on page Yes Yes