Jump to content

Template:Collapsible

From DynamicPageList4 Manual
Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit this template's documentation (edit) (about template documentation).
View this template's CSS styles (edit).


Example(s)

[edit source]
Text, no heading (collapsed)
  • {{collapsible|Example text content 1}} gives:

Example text content 1


Text, no heading (uncollapsed)
  • {{collapsible|Example text content 2|uncollapsed=y}} gives:

Example text content 2


Text, with heading (collapsed)
  • {{collapsible|Example text content 3|Label}} gives:
Label

Example text content 3


Text, with heading (collapsed) - Custom toggle text
  • {{collapsible|Example text content 4|Label|expandtext=Show Content|collapsetext=Hide Content}} gives:
Label

Example text content 4

  • {{collapsible|Example text content 5|Heading|expandtext=More Information|collapsetext=Less Information}} gives:
Heading

Example text content 5


Template Data

[edit source]

Creates a collapsible section (div element) with "Expand" or "Collapse" toggle buttons like a table. Can be un-collapsed or have the toggle text overridden for each state. Useful for folding up larger chunks of optional text content though should not really contain multi-sectioned text. It can, however, be used multiple times in a row with <hr> or ----, to create an accordion-style set of small content blocks.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
11

Enter the collapsed content.

Stringrequired
22

Enter an optional label (or header if you style bold)

Stringoptional
uncollapseduncollapsed

Any value un-collapses the collapsed (default) information entered.

Default
0
Booleanoptional
classclass

Entering a CSS class adds it to the overall div for styling.

Stringoptional
collapsetextcollapsetext

To override the collapse label, enter some text.

Stringoptional
expandtextexpandtext

To override the expand label, enter some text.

Stringoptional
stylestyle

To add styles, input valid CSS styles separated by semi-colons.

Stringoptional


Cookies help us deliver our services. By using our services, you agree to our use of cookies.