From Brotato Wiki

Revision as of 13:40, 11 December 2022 by Darkly77 (talk | contribs) (Add docs + Shorten `btntext` option to just `btn`)


Starts a toggleable section, with a button that collapses/uncollapses the wrapped text.

Must be used with ToggleEnd, which ends the toggleable section.

The ID should be unique, because the button will toggle any/all other toggleable sections with the same ID. Alternatively, if this effect is desired, the same ID can be used across multiple toggles.

Examples

Start Closed

This is the default behaviour, with the target section initially closed.

Code Preview
{{ToggleStart|id=foo|btn=Toggle Section}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
{{ToggleEnd}}
Toggle Section

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Start Open

Uses the option open=1.

Code Preview
{{ToggleStart|id=bar|btn=Toggle Section|open=1}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
{{ToggleEnd}}
Toggle Section

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Multiple Sections

You can toggle multiple sections with a single button, by using ToggleSection for each extra section.

Code Preview
{{ToggleStart|id=multidemo|btn=Toggle Section}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
{{ToggleEnd}}

{{ToggleSection|id=multidemo}}
Quisque aliquet ipsum nec magna mattis tincidunt.
{{ToggleEnd}}
Toggle Multiple Sections

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Quisque aliquet ipsum nec magna mattis tincidunt.


No description.

Template parameters

ParameterDescriptionTypeStatus
Button Textbtn

Text for the toggle button

Default
Toggle
Example
Toggle More Details
Stringrequired
IDid

Unique identifier for the toggle

Stringrequired