Template:Nb collapsegroup

From Red Faction Wiki
Revision as of 19:46, 6 July 2009 by TeslaRaptor (talk | contribs) (3 revisions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation

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

Template to be used in Template:Nb main. Creates a collapsible group within a navbox.

Usage

{{nb main
|header=title/caption of collapsible group
|data=
{{nb collapsegroup|rows=
rows in collapsible group
}}
}}

Optional:
collapsed=yes/no, whether this group is collapsed by default (defaults to yes)

All components of the "nb main" template can be inserted in the "rows" field.

Note that this template cannot be nested inside a block (but blocks can be inside this template).

Examples

Simple collapsible group

{{nb main
|name={{subst:PAGENAME}}
|title=Example
|data=
{{nb collapsegroup|header=Example: Collapsible group
|rows=
{{nb row|Test content within the collapsible group}}
{{nb group|Test group|Test content within the collapsible group}}
}}
}}

results in:

Example

Two collapsible groups

{{nb main
|name={{subst:PAGENAME}}
|title=Example
|data=
{{nb collapsegroup|header=Example: Collapsible group
|rows=
{{nb row|Test content within the '''first''' collapsible group}}
{{nb group|Test group|Test content within the '''first''' collapsible group}}
}}
{{nb collapsegroup|header=Example: Collapsible group 2
|rows=
{{nb row|Test content within the '''second''' collapsible group}}
{{nb group|Test group|Test content within the '''second''' collapsible group}}
}}
}}

results in:

Example

Combined with non-collapsible rows

{{nb main
|name={{subst:PAGENAME}}
|title=Example
|footer=Test footer
|data=
{{nb row|Test content ''outside'' the collapsible group}}
{{nb collapsegroup|header=Example: Collapsible group
|rows=
{{nb row|Test content '''within''' the collapsible group}}
{{nb group|Test group|Test content '''within''' the collapsible group}}
}}
{{nb row|Test content ''outside'' the collapsible group}}
{{nb group|Test group|Test content ''outside'' the collapsible group}}
{{nb header|Test header ''outside'' the collapsible group}}
{{nb group|Test group|Test content ''outside'' the collapsible group}}
}}

results in:

Example