Template:ToggleBox
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 tofalse
to start expanded. class
- Color theme of the ToggleBox. Can be
blue
orred
. Default isred
.
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 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 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 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:
- Create a subpage of this template with the language code of the language you want to translate to.
- 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.
- Translate the page according to the translation requirements of normal pages.