Templat:Navbox/bak pasir/doc
Penggunaan
suntingNo image
sunting {{Navbox/bak pasir
| name = Navbox/bak pasir/dok
| title = [[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 =
* [[E-Government]]
* [[MyKad]]
}}
With image, without groups
sunting {{Navbox/bak pasir
| name = Navbox/bak pasir/dok
| title = [[MSC Malaysia]]
| listclass = hlist
| image = [[File:Flag of Malaysia.svg|80px|link=|alt=]]
| list1 =
* [[Petronas Twin Towers]]
* [[Kuala Lumpur Tower]]
* [[Kuala Lumpur Sentral]]
* [[Technology Park Malaysia]]
* [[Putrajaya]]
* [[Cyberjaya]]
* [[Kuala Lumpur International Airport]]
}}
With two images, without groups, multiple lists
sunting {{Navbox/bak pasir
| name = Navbox/bak pasir/dok
| title = [[MSC Malaysia]]
| listclass = hlist
| image = [[File:Flag of Malaysia.svg|80px|link=|alt=]]
| imageleft = [[File:Flag of Malaysia.svg|80px]]
| list1 =
* [[Petronas Twin Towers]]
* [[Kuala Lumpur Tower]]
* [[Kuala Lumpur Sentral]]
| list2 =
* [[Express Rail Link]]
* [[KL-KLIA Dedicated Expressway]]
| list3 =
* [[E-Government]]
* [[MyKad]]
| list4 =
* [[Klang Valley]]
}}
With image, groups, above, below
sunting {{Navbox/bak pasir
| name = Navbox/bak pasir/dok
| title = [[MSC Malaysia]]
| listclass = hlist
| above = Above text goes here
| image = [[File:Flag of Malaysia.svg|80px|link=|alt=]]
| 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]]
| group4 = Infrastructure
| list4 =
* [[Express Rail Link]]
* [[KL-KLIA Dedicated Expressway]]
| group5 = Prime applications
| list5 =
* [[E-Government]]
* [[MyKad]]
| below = Below text goes here
}}
Child navboxes
sunting
It is possible to place multiple navboxes within a single border by using "child" as the first parameter, or by setting the border parameter. The basic code for doing this is as follows (which adds a subgroup for the first group/list area):
{{Navbox/bak pasir | name = {{subst:PAGENAME}} | title = Title | group1 = [optional] | list1 = {{Navbox/bak pasir|child ...child navbox parameters... }} ... }}
Subgroups example
suntingThis example shows two subgroups created using child
as the first unnamed parameter. The striping is alternated automatically. To remove the striping altogether, you can set liststyle = background:transparent;
in each of the navboxes.
Multiple show/hides in a single container
suntingThe example below is generated using a regular navbox for the main container, then its list1, list2, and list3 parameters each contain another navbox, with 1 = child
set. The view (v), discuss (d), edit (e) navbar links are hidden using navbar = plain
for each of them, or could be suppressed by just leaving out the name parameter (child navboxes do not require the name parameter to be set, unlike regular navboxes).