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!
== Parameter descriptions == The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>, though [[Template:Navbox/doc#Child navboxes|child navboxes]] do not even require those to be set. {{tl|Navbox}} shares numerous common parameter names as its sister template {{tl|Navbox with collapsible groups}} for consistency and ease of use. Parameters marked with an asterisk <nowiki>*</nowiki> are common to all templates. === Setup parameters === ; ''name''<nowiki>*</nowiki> : The name of the template, which is needed for the view, discuss, and edit icon 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. ; ''state''<nowiki>*</nowiki> <span style="font-weight:normal;">[<code>uncollapsed, collapsed, off</code>]</span> :* Defaults to <code>uncollapsed</code>. :* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state. :* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right. :* If set to anything other than <code>collapsed</code>, or <code>off</code> (such as <code>uncollapsed</code>), the navbox will always start out in an expanded state, but have the "hide" button. : To define a default initial state for a navbox that can be overridden in an article: :* In your intermediate template, create a parameter also named "state" as a pass-through: :: <tt><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></tt> :* The <nowiki><includeonly>|</nowiki> will expand the template when viewing the template page by itself. : Example: {{tl|Absalom navbox}} with autocollapse as the default initial state. [[The Docks]] transcludes it and has only one navbox, so the Absalom navbox shows. [[Absalom]] has two navboxes, so the Absalom navbox collapses. <!-- No PFW navboxes use expanded as the default Example: {{tl|Historical currencies of Hungary}} with expanded as the default initial state. All transcluding articles shows the content by default, unless there were an hypothetical article that specifies state = collapsed when transcluding. --> === Cells === ; ''title''<nowiki>*</nowiki> : Text that appears centered in the top row of the table. It is usually the template's topic, i.e. a succinct description of the body contents. This should be a single line, but if a second line is needed, use <code><nowiki>·</nowiki></code> to ensure proper centering. This parameter is technically not mandatory, but using {{tl|Navbox}} is rather pointless without a title. ; ''group<sub>n</sub>''<nowiki>*</nowiki> : (i.e. ''group1'', ''group2'', etc.) If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table. ; ''groupBackground''<nowiki>*</nowiki> : If specified, changes the background color of the groups of this Navbox and all contained Navboxes. ; ''groupColor''<nowiki>*</nowiki> : If specified, changes the text color of the groups of this Navbox and all contained Navboxes. ; ''list<sub>n</sub>''<nowiki>*</nowiki> : (i.e. ''list1'', ''list2'', etc.) The body of the template, usually a bulleted list of links. Format is inline, although the text can be entered on separate lines if the entire list is enclosed within <code><nowiki><div> </div></nowiki></code>. At least one ''list'' parameter is required; each additional ''list'' is displayed in a separate row of the table. Each ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below). ; ''image''<nowiki>*</nowiki> : An image to be displayed in a cell below the title and to the right of the body (the groups/lists). For the image to display properly, the ''list1'' parameter must be specified. The ''image'' parameter accepts standard wikicode for displaying an image, ''e.g.'': :: <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|90px|link=|alt=]]</nowiki></code> ; ''above''<nowiki>*</nowiki> : A full-width cell displayed between the titlebar and first group/list, i.e. ''above'' the template's body (groups, lists and image). In a template without an image, ''above'' behaves in the same way as the ''list1'' parameter without the ''group1'' parameter. ; ''below''<nowiki>*</nowiki> : A full-width cell displayed ''below'' the template's body (groups, lists and image). In a template without an image, ''below'' behaves in the same way as the template's final ''list<sub>n</sub>'' parameter without a ''group<sub>n</sub>'' parameter. <!-- For an example of the ''below'' parameter in use, see {{tl|Lists of the provinces and territories of Canada}}. -->
Summary:
Please note that all contributions to 2d4chan may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, 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 (see
2d4chan:Copyrights
for details).
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 source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information