Editing
Template:Navbox/doc
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Setup parameters === ; ''name''* : The name of the template, which is needed for the "V β’ T β’ E" ("View β’ Talk β’ Edit") links to work properly on all pages where the template is used. You can enter <code><nowiki>{{subst:PAGENAME}}</nowiki></code> for this value as a shortcut. The name parameter is only mandatory if a <code>title</code> is specified, and the <code>border</code> parameter is not set, and the <code>navbar</code> parameter is not used to disable the navbar. ; ''state''* <span style="font-weight:normal;">[<code>autocollapse, collapsed, expanded, plain, off</code>]</span>{{anchor|Autocollapse}} :* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more collapsible elements on the same page. Otherwise, the navbox will be expanded. For the technically minded, see [[MediaWiki:Common.js]] (search for "autocollapse"). :* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state. :* If set to <code>expanded</code>, the navbox will always start out in an expanded state. :* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>V β’ T β’ E</small> links). :* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden. : To show the box when standalone (non-included) but then auto-hide contents when in an article, put "expanded" inside {{tag|noinclude|p}} tags. This setting will force the box to be visible when standalone (even when followed by other boxes), displaying "[hide]", but then it will auto-collapse the box when stacked inside an article: :: <code><nowiki>| state = </nowiki></code>{{tag|noinclude|content=expanded}} :Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this: :* In your intermediate template, create a parameter also named "state" as a pass-through like this: <pre><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></pre> :* The {{tag|includeonly|o}}<code>|</code> will make the template expanded when viewing the template page by itself. :** Example 1: {{tl|Peso}} with ''autocollapse'' as the default initial state. [[Catalan peseta]] transcludes it and has only one navbox; thus, the peso navbox shows. [[Chilean peso]] has more than two navboxes; thus, the peso navbox collapses. :** Example 2: {{tl|Historical currencies of Hungary}} with ''expanded'' as the default initial state, as such: <pre>| state = {{{state<includeonly>|expanded</includeonly>}}}</pre> All transcluding articles show the content by default, unless there is a hypothetical article that specifies <code><nowiki>{{templatename|state=collapsed}}</nowiki></code> when transcluding. :** Example 3: {{tl|Tourism}} with ''collapsed'' as the default initial state, as such: <pre>| state = {{{state<includeonly>|collapsed</includeonly>}}}</pre> All transcluding articles will show the template as collapsed by default, but the template will still be uncollapsed when displayed on its own page. :* The template {{tl|Collapsible option}} explains how to use the <code>state</code> parameter. It can be added to a {{tag|noinclude|p}} section after the template definition or to the instructions on the {{tl|documentation subpage}}. ; ''navbar''* : If set to <code>plain</code>, the <span style="font-size: 88%;">V β’ T β’ E</span> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <span style="font-size: 88%;">V β’ T β’ E</span> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). It is highly recommended that one not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages. ; ''border''* : ''See later section on [[#Child navboxes|using navboxes within one another]] for examples and a more complete description.'' If set to <code>child</code> or <code>subgroup</code>, then the navbox can be used as a borderless child that fits snugly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the ''list'' area of its parent navbox. If set to <code>none</code>, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the <code>none</code> option inside of another navbox; similarly, only use the <code>child</code>/<code>subgroup</code> option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named ''border'' parameter): :<pre>{{Navbox|child|...}}</pre>
Summary:
Please note that all contributions to Mirrorplay: Fae are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
MPFae:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information