Template:Nb collapsegroup/doc: Difference between revisions

From Red Faction Wiki
m (1 revision)
(No difference)

Revision as of 10:58, 6 July 2009

Template:Documentationpage 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