Template:Navbox: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Link to documentation for the template from about the time it was copied)
(+rel: Template:Sidebar)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!--
<!--
 
************************************************************************************
Please do not edit without discussion first as this is a VERY complex template.
Please do not edit without discussion first as this is a VERY complex template. *
************************************************************************************


-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table cellspacing="0" <!--
-->{{#switch:{{{border|{{{1|}}}}}}|subgroup|child=</div>|none=|#default=<table cellspacing="0" <!--
Line 292: Line 293:
  }}
  }}
}}}}}}<noinclude>{{Informative template |1=
}}}}}}<noinclude>{{Informative template |1=
== Goal ==
This is a template used by primarily to simplify creating horizontal navboxes usually found at the bottom of pages.
__TOC__
== Usage ==  
== Usage ==  
Please refer to [http://en.wikipedia.org/w/index.php?title=Template:Navbox/doc&oldid=488952898 Template:Navbox/doc as of 24 April 2012] on English Wikipedia.
<nowiki>{{</nowiki>'''navbox'''
<nowiki>|</nowiki>name      = <nowiki>{{subst:PAGENAME}}</nowiki>
<nowiki>|</nowiki>''title''      =
<nowiki>|</nowiki>''image''      =
<nowiki>|</nowiki>''imageleft''  =
<nowiki>|</nowiki>''above''      =
<nowiki>|</nowiki>''state''      =
<nowiki>|</nowiki>''listclass''  = hlist
<nowiki>|</nowiki>''group1''    =
<nowiki>|</nowiki>''list1''      =
<nowiki>|</nowiki>''group2''    =
<nowiki>|</nowiki>''list2''      =
...
<nowiki>|</nowiki>''group20''    =
<nowiki>|</nowiki>''list20''    =
<nowiki>|</nowiki>''below''      =
<nowiki>}}</nowiki>
 
The only mandatory parameter is '''name''' and only if '''title''' is set.
 
=== Most commonly used parameters ===
; name:  Name of the template.  This is needed to make the V&bull;T&bull;E links ("view", "talk" and "edit") work if '''title''' is set to something else than the name of the template using this template.  Otherwise <code><nowiki>{{subst:PAGENAME}}</nowiki></code> can be used.
 
; title:  Title in the title bar
 
; image:  An optional image to use on the right side, in full wiki code, for example <code><nowiki>[[File:Thumbs up 32px.png|32px|link=|alt=]]</nowiki></code>
 
; imageleft:  An optional image to use on the left side.
 
; above:  Text to appear between the title bar and the group/list section.  Could for example be a list of wiki links.
 
; state:  Controls the starting state of the title bar. Can be either of:
:; autocollapse
:: This is the default and will cause the navbox to start collapsed if there are two or more collapsible tables on the same page.
:; uncollapsed
:: The navbox will always start uncollapsed
:; collapsed
:: The navbox will always start collapsed
:; plain
:: The title will always be centered and the navbox will always be expanded with no <nowiki>[Hide]</nowiki> link
:; off
:: The navbox will always be expanded with no <nowiki>[Hide]</nowiki> link.  The title will not be centered. For advanced use only.
: If anything else than the above is used, the navbox will always start expanded and with the <nowiki>[Hide]</nowiki> link.
 
; listclass:  A cascading style sheet (CSS) class to use for the lists, usually <code>hlist</code> for horizontal lists.
 
; below:  Optional text to show below the group/list section.
 
; group(n):  Optional text to the left of the list(n) section.  There can be up to 20 group/list sections.
 
; list(n):  Text with wikilinks in a wiki list format.
 
== Related templates ==
* {{tl|sidebar}}
 
== External links ==
* [http://en.wikipedia.org/w/index.php?title=Template:Navbox/doc&oldid=488952898 Template:Navbox/doc as of 24 April 2012] on English Wikipedia.
 
}}
}}


[[Category:Templates]]
[[Category:Navigation templates]]
</noinclude>
</noinclude>

Latest revision as of 13:58, 2 November 2014

The following template description is not displayed when the template is inserted in an article.

Goal

This is a template used by primarily to simplify creating horizontal navboxes usually found at the bottom of pages.

Usage

{{navbox
|name       = {{subst:PAGENAME}}
|title      = 
|image      = 
|imageleft  = 
|above      = 
|state      = 
|listclass  = hlist

|group1     = 
|list1      = 

|group2     = 
|list2      = 
...
|group20    = 
|list20     = 

|below      = 
}}

The only mandatory parameter is name and only if title is set.

Most commonly used parameters

name
Name of the template. This is needed to make the V•T•E links ("view", "talk" and "edit") work if title is set to something else than the name of the template using this template. Otherwise {{subst:PAGENAME}} can be used.
title
Title in the title bar
image
An optional image to use on the right side, in full wiki code, for example [[File:Thumbs up 32px.png|32px|link=|alt=]]
imageleft
An optional image to use on the left side.
above
Text to appear between the title bar and the group/list section. Could for example be a list of wiki links.
state
Controls the starting state of the title bar. Can be either of:
autocollapse
This is the default and will cause the navbox to start collapsed if there are two or more collapsible tables on the same page.
uncollapsed
The navbox will always start uncollapsed
collapsed
The navbox will always start collapsed
plain
The title will always be centered and the navbox will always be expanded with no [Hide] link
off
The navbox will always be expanded with no [Hide] link. The title will not be centered. For advanced use only.
If anything else than the above is used, the navbox will always start expanded and with the [Hide] link.
listclass
A cascading style sheet (CSS) class to use for the lists, usually hlist for horizontal lists.
below
Optional text to show below the group/list section.
group(n)
Optional text to the left of the list(n) section. There can be up to 20 group/list sections.
list(n)
Text with wikilinks in a wiki list format.

Related templates

External links