Dynamic navigation box
Talk0
31,802pages on
this wiki
this wiki
Template page
| {{{title}}} |
|---|
| {{{body}}} |
The below individual Sister-project template-tagging-templates may be ported from en.wp or Meta:
</noinclude>
Contents |
Blank
Edit
{{Dynamic navigation box
|name = {{subst:PAGENAME}}
|title =
|body =
}}
Parameters
Edit
Mandatory
Edit
Parameter:
- 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
- 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
- Contents of the navigation box. Use | to separate links. It is not possible to include a pipe (|) in the contents as this symbol is used to separate parameters.
Optional
Edit
- style
- Specifies CSS values to apply to the template. For instance:
text-align: (right|center|left|justified); width: (em, %, px, auto); float: (left|right|none); clear: (right|left|both|none); margin:...etc. This option should be used sparingly as it can lead to visual inconsistencies. - color
- Header color. Default is #ccf. Use of this parameter is discouraged. Where it is used, care and consensus are needed as multiple navigational templates on one page with different titlebar colors will probably look unpleasant.
- state
- Defaults to
autocollapse. If set tocollapsed, the navbox will always start out in a collapsed state. If set to blank or anything other thanautocollapseorcollapsed, the navbox will always start out in an expanded state. A navbox withautocollapsewill start out collapsed if there are 2 or more tables on the same page that use collapsible. For the technically minded, see MediaWiki:Common.js.
Example
Edit
Code
Edit
{{Dynamic navigation box
|name = {{subst:{{PAGENAME}}}}
|title = [[Wikipedia:Navigational templates|Navigational templates]]
|body = [[Template:Cosmology|Cosmology]]{{·}} [[Template:General relativity|Relativity]]{{·}}
[[Template:Continents of the world|World continents]]
}}
Result
Edit
| Navigational templates |
|---|
| Cosmology · Relativity · |
See also
Edit
| collapsible | Header color† | Image | Groups | Style (body) parameter/s | Examples | |
|---|---|---|---|---|---|---|
| {{Navbox}} |
collapsible ||style="background:#ccccff;"| navbox |
Left/right of body || style="background:#90ff90; color:black;" class="table-yes" | Yes | style="background:#90ff90; color:black;" class="table-yes" | Yes | {{USCongress}}, {{Apollo program}} | ||
| {{Navbox with columns}} |
collapsible ||style="background:#ccccff;"| navbox |
Left/right of columns || style="background:#ff9090; color:black; vertical-align: middle; text-align: center; " class="table-no" | No || style="background:#90ff90; color:black;" class="table-yes" | Yes | {{Current U.S. Senators}}, {{UK subdivisions}} | |||
| † The background color for the header or title is inherited from the class listed below. The templates have titlestyle parameters that can be used to override the default. | ||||||
| Type | CSS classes | Collapses when | Custom initial state | Nesting | Default header color | Font size |
|---|---|---|---|---|---|---|
| Collapsible tables | collapsible, navbox | 2 or more autocollapse on page | Yes | style="background:#90ff90; color:black;" class="table-yes" | Yes | #ccccff | 90% |
| This page uses Creative Commons Licensed content from Wikipedia (view authors). |