Template:ToggleBox

From PZwiki
Notebook.pngTemplate Documentation

This template is used to create a collapsible {{ToggleBox}}.

This is a collapsible element. It can be toggled by clicking the "◥" sign on the top-right corner.

When collapsed, the content will be hidden, only the title will be displayed.

Usage

Parameters

title
Toggle box title.
content
Normal text.
id
ID for each ToggleBox to collapse the content. Should be a unique number.
collapsed
Initial state of the content. Will be collapsed by default (true). Set to false to start expanded.
class
Color theme of the ToggleBox. Can be blue or red. Default is red.

Examples

The contents will be hidden by default collapsed=true.

{{ToggleBox
| title = This is a toggle box
| content = This will start hidden.
| id = 1
}}
This is a toggle boxShow / Hide

This will start hidden.


The contents can be set to start shown collapsed=false.

{{ToggleBox
| title = This is a toggle box
| content = This will start shown.
| id = 2
| collapsed = false
}}
This is a toggle boxShow / Hide

This will start shown.

The blue theme.

{{ToggleBox
| title = This is a toggle box
| content = This will start shown.
| id = 3
| collapsed = false
| class = blue
}}
This is a toggle boxShow / Hide

This will start shown.

How to translate

This template doesn't need to/shouldn't be translated, but you can translate the documentation of this template with the following steps:

  1. Create a subpage of this template with the language code of the language you want to translate to.
  2. Copy the code wrapped in the <noinclude> tag in this template into the page you created.
    {{Translation guide}} template should be removed from the translated documentation.
  3. Translate the page according to the translation requirements of normal pages.

See also

Attribution

Editors can experiment in this template's sandbox.