Template:Navbox group: Difference between revisions

From Red Faction Wiki
m (1 revision)
 
m (1 revision)
(One intermediate revision by the same user not shown)
(No difference)

Revision as of 21:24, 3 July 2009

Name?
Navbox title?

Documentation

File:Mbox documentationpage.png
Documentation transcluded
The documentation for this template is transcluded from Template:Navbox group/doc.
To edit it, please edit the transcluded page.

Template for creating simple group navboxes. Supports up to 8 groups with 5 subgroups each.

Navboxes created with this template auto-collapse if there are more than 2 on a page (see Template:Nb main).

Usage

{{navbox group
|name      =Template name (without "Template:" prefix); you can use {{subst:PAGENAME}}
|title     =Title of your navbox
|headerA   =content of first header
|groupA1   =name of first group row
|contentA1 =content of first group row
|groupA2   =name of second group row
|contentA2 =content of second group row
etc.

Optional:
|footer       =Content of footer, if needed
|blockA       =Block name. Turns all subgroups belonging to group A (groupA1, groupA2 etc) into subgroups under this header. (blockB, blockC etc for the other groups)
|headeralign  =different text-alignment for header rows (left/right/center) if desired; centered by default
|groupalign   =different text-alignment for group and block cells (left/right/center) if desired; centered by default
|contentalign =different text-alignment for content cells (left/right/center) if desired; left-aligned by default
|footeralign  =different text-alignment for footer (left/right/center) if desired; centered by default
|nowraplinks  =yes/no, whether links should be wrapped (no) or not (yes); defaults to yes
}}

All header, group and content fields are not displayed if not specified. Exception: If you turn a group into a block, the first subgroup of that block has to be set (e.g. if you set blockB=Some block, groupB1 has to be specified).

Maximum content is 8 groups (A up to H) with 5 subgroups (1 up to 5) each.

Examples

without footer

{{navbox group
|name={{subst:PAGENAME}}
|title=Title of your navbox
|headerA=Header A
|groupA1=First subgroub of A
|contentA1=First subgroub content of A
|groupA2=Second subgroub of A
|contentA2=Second subgroub content of A
|headerB=Header B
|groupB1=First subgroub of B
|contentB1=First subgroub content of B
|groupB2=Second subgroub of B
|contentB2=Second subgroub content of B
}}

results in:

Title of your navbox

with footer

{{navbox group
|name={{subst:PAGENAME}}
|title=Title of your navbox
|headerA=Header A
|groupA1=First subgroub of A
|contentA1=First subgroub content of A
|groupA2=Second subgroub of A
|contentA2=Second subgroub content of A
|headerB=Header B
|groupB1=First subgroub of B
|contentB1=First subgroub content of B
|groupB2=Second subgroub of B
|contentB2=Second subgroub content of B
|footer=Footer
}}

results in:

Title of your navbox