FANDOM


Name?
Navbox title?
Template documentation (for the template shown above, sometimes hidden or invisible)

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=%7B%7Bsubst%3APAGENAME%7D%7D
|title=Title of your navbox
|headerA=Header A
|groupA1=First subgroup of A
|contentA1=First subgroup content of A
|groupA2=Second subgroup of A
|contentA2=Second subgroup content of A
|headerB=Header B
|groupB1=First subgroup of B
|contentB1=First subgroup content of B
|groupB2=Second subgroup of B
|contentB2=Second subgroup content of B
}}

results in:

Title of your navbox

with footer

{{navbox group
|name=%7B%7Bsubst%3APAGENAME%7D%7D
|title=Title of your navbox
|headerA=Header A
|groupA1=First subgroup of A
|contentA1=First subgroup content of A
|groupA2=Second subgroup of A
|contentA2=Second subgroup content of A
|headerB=Header B
|groupB1=First subgroup of B
|contentB1=First subgroup content of B
|groupB2=Second subgroup of B
|contentB2=Second subgroup content of B
|footer=Footer
}}

results in:

Title of your navbox
Documentation transcluded from Template:Navbox group/doc.
除了特别提示,社区内容遵循CC-BY-SA 授权许可。