Template:Nb main/doc: Difference between revisions
(→Usage) |
TeslaRaptor (talk | contribs) m (1 revision) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
* [[Template:Navbox]]: Bottom; one row and (optional) footer. | * [[Template:Navbox]]: Bottom; one row and (optional) footer. | ||
* [[Template:Navbox group]]: Bottom; up to 8 main groups with (optional) sub-headers and up to 5 sub-groups each. | * [[Template:Navbox group]]: Bottom; up to 8 main groups with (optional) sub-headers and up to 5 sub-groups each. | ||
* [[Template:Navbox side]]: Side (left or right), up to 5 groups of up to | * [[Template:Navbox collapsible group]]: Bottom; up to 8 main groups with collapsible headers and up to 5 sub-groups each. | ||
* [[Template:Navbox side]]: Side (left or right), up to 5 groups of up to 5 rows each with (optional) sub-headers. | |||
==Usage== | ==Usage== | ||
Line 21: | Line 22: | ||
{{nb group|Group|Group content}} | {{nb group|Group|Group content}} | ||
{{nb row|Row}} | {{nb row|Row}} | ||
}} | }} | ||
Optional: | Optional: | ||
|footer=Footer text | |||
|footeralign=text-alignment of footer | |||
|nowraplinks=yes/no - don't wrap links in the content fields of this navbox? (defaults to yes) | |||
|width=Width of your navbox, e.g. ''250px'' or ''60%'' (defaults to 80%). | |width=Width of your navbox, e.g. ''250px'' or ''60%'' (defaults to 80%). | ||
|position=left, right or bottom (defaults to bottom) | |position=left, right or bottom (defaults to bottom) | ||
|showedit=yes/no, shows/hides the view/edit/talk bar in the top left (defaults to yes). | |showedit=yes/no, shows/hides the view/edit/talk bar in the top left (defaults to yes). | ||
</pre> | </pre> | ||
Use any combination of components you like. All components support changing their text-alignment via | Use any combination of components you like. All components support changing their text-alignment via ''align'' (''align1'' and ''align2'' for the group row; ''align1'', ''align2'' and ''blockalign'' for the block). See component pages for details. | ||
===Components=== | ===Components=== | ||
Line 35: | Line 38: | ||
* [[Template:Nb row]] | * [[Template:Nb row]] | ||
* [[Template:Nb group]] | * [[Template:Nb group]] | ||
* [[Template:Nb | * [[Template:Nb collapsegroup]] | ||
* [[Template:Nb block]] | |||
==Examples== | ==Examples== | ||
Line 41: | Line 45: | ||
===Simple box=== | ===Simple box=== | ||
{{nb main | {{nb main | ||
|name=Nb main/doc | |||
|title=Test | |title=Test | ||
|data= | |data= | ||
Line 49: | Line 54: | ||
===Simple box with sub-headers=== | ===Simple box with sub-headers=== | ||
{{nb main | {{nb main | ||
|name=Nb main/doc | |||
|title=Test | |title=Test | ||
|data= | |data= | ||
Line 61: | Line 67: | ||
===Simple group box=== | ===Simple group box=== | ||
{{nb main | {{nb main | ||
|name=Nb main/doc | |||
|title=Test | |title=Test | ||
|data= | |data= | ||
Line 71: | Line 78: | ||
===Mixed box with footer=== | ===Mixed box with footer=== | ||
{{nb main | {{nb main | ||
|name=Nb main/doc | |||
|title=Test | |title=Test | ||
|footer=Footer | |||
|data= | |data= | ||
{{nb header|Header}} | {{nb header|Header}} | ||
Line 79: | Line 88: | ||
{{nb row|Row}} | {{nb row|Row}} | ||
{{nb row|Row}} | {{nb row|Row}} | ||
}} | }} |
Revision as of 10:58, 6 July 2009
Template:Documentationpage Template used for building navboxes.
Standard navboxes (i.e. those inserted at the bottom of an article) are collapsible and will be auto-collapsed if there are more than 2 of them on a page (number can be changed in MediaWiki:Common.js). Side navboxes are not collapsible and do not count towards this limit.
- Template:Navbox: Bottom; one row and (optional) footer.
- Template:Navbox group: Bottom; up to 8 main groups with (optional) sub-headers and up to 5 sub-groups each.
- Template:Navbox collapsible group: Bottom; up to 8 main groups with collapsible headers and up to 5 sub-groups each.
- Template:Navbox side: Side (left or right), up to 5 groups of up to 5 rows each with (optional) sub-headers.
Usage
Please note that in order to maintain a standardized look, the width should only be changed if really necessary (e.g. for sideboxes). All boxes placed at the bottom should keep the standard width, i.e. no width attribute should be specified.
The name attribute should be set at top level, i.e. in the navbox that actually contains content. All intermediate templates (those which are used to construct the final product) should hand the attribute down to Template:Nb main.
{{nb main |name=Name of template (without "Template:" prefix) |title=Title of your navbox |data= {{nb header|Header}} {{nb group|Group|Group content}} {{nb row|Row}} }} Optional: |footer=Footer text |footeralign=text-alignment of footer |nowraplinks=yes/no - don't wrap links in the content fields of this navbox? (defaults to yes) |width=Width of your navbox, e.g. ''250px'' or ''60%'' (defaults to 80%). |position=left, right or bottom (defaults to bottom) |showedit=yes/no, shows/hides the view/edit/talk bar in the top left (defaults to yes).
Use any combination of components you like. All components support changing their text-alignment via align (align1 and align2 for the group row; align1, align2 and blockalign for the block). See component pages for details.
Components
Examples
Simple box
|
Simple box with sub-headers
|
Simple group box
|
|