Template:Navbox/doc: Difference between revisions
Jump to navigation
Jump to search
(Created page with "test") |
No edit summary |
||
Line 1: | Line 1: | ||
This template is taken from Wikipedia (with some changes), see full documentation on it in [http://en.wikipedia.org/wiki/Template:Navbox/doc wikipedia]. | |||
<h3>Some highlights:</h3> | |||
Please remove the parameters that are left blank. | |||
<pre style="overflow: auto;">{{Navbox | |||
| name = {{subst:PAGENAME}} | |||
| title = | |||
| listclass = hlist | |||
| state = {{{state|}}} | |||
| above = | |||
| image = | |||
| group1 = | |||
| list1 = | |||
| group2 = | |||
| list2 = | |||
... | |||
| group20 = | |||
| list20 = | |||
| below = | |||
}} | |||
</pre> | |||
== Parameter list == | |||
{{Navbox | |||
| name = Navbox/doc | |||
| state = uncollapsed | |||
| title = {{{title}}} | |||
| above = {{{above}}} | |||
| image = {{{image}}} | |||
| group1 = {{{group1}}} | |||
| list1 = {{{list1}}} | |||
| group2 = {{{group2}}} | |||
| list2 = {{{list2}}} | |||
| list3 = {{{list3}}} ''without {{{group3}}}'' | |||
| group4 = {{{group4}}} | |||
| list4 = {{{list4}}} | |||
| below = {{{below}}} <br /> See alternate navbox formats under: [[#Layout of table|''Layout of table'']] | |||
}} | |||
The navbox uses lowercase parameter names, as shown in the box (''above''). The required ''name'' and ''title'' will create a one-line box if other parameters are omitted. | |||
Notice "group1" (etc.) is optional, as are sections named "above/below". | |||
{{clear}} | |||
The basic and most common parameters are as follows (see [[#Parameter descriptions|below]] for the full list): | |||
: <code>name</code> – the name of the template. | |||
: <code>title</code> – text in the title bar, such as: <nowiki>[[Widget stuff]]</nowiki>. | |||
: <code>listclass</code> – a CSS class for the list cells, usually <code>hlist</code> for horizontal lists. Alternatively, use bodyclass for the whole box. | |||
: <code>state</code> – controls when a navbox is expanded or collapsed. | |||
: <code>titlestyle</code> – a CSS style for the title-bar, such as: <code>background: gray;</code> | |||
: <code>groupstyle</code> – a CSS style for the group-cells, such as: <code>background: #eee;</code> | |||
: <code>above</code> – text to appear above the group/list section (could be a list of overall wikilinks). | |||
: <code>image</code> – an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as <code><nowiki>[[File:</nowiki><var>XX</var><nowiki>.jpg|80px|link=|alt=]]</nowiki></code>. | |||
: <code>imageleft</code> – an optional left-side image (code the same as the "image" parameter). | |||
: <code>group<sub>n</sub></code> – the left-side text before list-n (if group-n omitted, list-n starts at left of box). | |||
: <code>list<sub>n</sub></code> – text listing wikilinks using a [[Help:Lists|wikilist]] format. | |||
: <code>below</code> – optional text to appear below the group/list section. | |||
== Usage example == | |||
<pre style="overflow: auto;"> | |||
{{Navbox | |||
| name = Navbox/doc | |||
| title = [[Multimedia Super Corridor|MSC Malaysia]] | |||
| listclass = hlist | |||
| group1 = Centre | |||
| list1 = | |||
* [[Cyberjaya]] | |||
| group2 = Area | |||
| list2 = | |||
* [[Klang Valley]] | |||
| group3 = Major landmarks | |||
| list3 = | |||
* [[Petronas Twin Towers]] | |||
* [[Kuala Lumpur Tower]] | |||
* [[Kuala Lumpur Sentral]] | |||
* [[Technology Park Malaysia]] | |||
* [[Putrajaya]] | |||
* [[Cyberjaya]] | |||
* [[Kuala Lumpur International Airport]] | |||
| group4 = Infrastructure | |||
| list4 = | |||
* [[Express Rail Link]] | |||
* [[KL-KLIA Dedicated Expressway]] | |||
| group5 = Prime applications | |||
| list5 = | |||
* [[EGovernment]] | |||
* [[MyKad]] | |||
}} | |||
</pre> | |||
{{Navbox | |||
| name = Navbox/doc | |||
| state = uncollapsed | |||
| title = [[Multimedia Super Corridor|MSC Malaysia]] | |||
| listclass = hlist | |||
| group1 = Centre | |||
| list1 = | |||
* [[Cyberjaya]] | |||
| group2 = Area | |||
| list2 = | |||
* [[Klang Valley]] | |||
| group3 = Major landmarks | |||
| list3 = | |||
* [[Petronas Twin Towers]] | |||
* [[Kuala Lumpur Tower]] | |||
* [[Kuala Lumpur Sentral]] | |||
* [[Technology Park Malaysia]] | |||
* [[Putrajaya]] | |||
* [[Cyberjaya]] | |||
* [[Kuala Lumpur International Airport]] | |||
| group4 = Infrastructure | |||
| list4 = | |||
* [[Express Rail Link]] | |||
* [[KL-KLIA Dedicated Expressway]] | |||
| group5 = Prime applications | |||
| list5 = | |||
* [[EGovernment]] | |||
* [[MyKad]] | |||
}} |
Revision as of 19:26, 31 October 2014
This template is taken from Wikipedia (with some changes), see full documentation on it in wikipedia.
Some highlights:
Please remove the parameters that are left blank.
{{Navbox | name = {{subst:PAGENAME}} | title = | listclass = hlist | state = {{{state|}}} | above = | image = | group1 = | list1 = | group2 = | list2 = ... | group20 = | list20 = | below = }}
Parameter list
|
The navbox uses lowercase parameter names, as shown in the box (above). The required name and title will create a one-line box if other parameters are omitted.
Notice "group1" (etc.) is optional, as are sections named "above/below". Template:Clear The basic and most common parameters are as follows (see below for the full list):
name
– the name of the template.title
– text in the title bar, such as: [[Widget stuff]].listclass
– a CSS class for the list cells, usuallyhlist
for horizontal lists. Alternatively, use bodyclass for the whole box.state
– controls when a navbox is expanded or collapsed.titlestyle
– a CSS style for the title-bar, such as:background: gray;
groupstyle
– a CSS style for the group-cells, such as:background: #eee;
above
– text to appear above the group/list section (could be a list of overall wikilinks).image
– an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as[[File:XX.jpg|80px|link=|alt=]]
.imageleft
– an optional left-side image (code the same as the "image" parameter).groupn
– the left-side text before list-n (if group-n omitted, list-n starts at left of box).listn
– text listing wikilinks using a wikilist format.below
– optional text to appear below the group/list section.
Usage example
{{Navbox | name = Navbox/doc | title = [[Multimedia Super Corridor|MSC Malaysia]] | listclass = hlist | group1 = Centre | list1 = * [[Cyberjaya]] | group2 = Area | list2 = * [[Klang Valley]] | group3 = Major landmarks | list3 = * [[Petronas Twin Towers]] * [[Kuala Lumpur Tower]] * [[Kuala Lumpur Sentral]] * [[Technology Park Malaysia]] * [[Putrajaya]] * [[Cyberjaya]] * [[Kuala Lumpur International Airport]] | group4 = Infrastructure | list4 = * [[Express Rail Link]] * [[KL-KLIA Dedicated Expressway]] | group5 = Prime applications | list5 = * [[EGovernment]] * [[MyKad]] }}
|