Template:Spoiler: Difference between revisions
Animated! (Uses .custom-collapsible, not .mw-collapsible) |
m Removed newline before <noinclude> |
||
Line 1: | Line 1: | ||
<div class="custom-collapsible">[ <span class="custom-collapsible-link">{{#if:{{{2|}}}|Show {{{2}}}|Show}}</span> ]</div> | <div class="custom-collapsible">[ <span class="custom-collapsible-link">{{#if:{{{2|}}}|Show {{{2}}}|Show}}</span> ]</div> | ||
<div class="custom-collapsible-content">{{{1}}}</div> | <div class="custom-collapsible-content">{{{1}}}</div><noinclude> | ||
<noinclude> | |||
A collapsible block with custom text for the toggle label. | A collapsible block with custom text for the toggle label. | ||
Revision as of 13:36, 19 November 2023
[ Show ]
{{{1}}}
A collapsible block with custom text for the toggle label.
For example:
{{Spoiler|The cake is a lie!}}
produces:
[ Show ]
The cake is a lie!
You can add a second argument if you want to customise the toggle label:
{{Spoiler||The cake is a lie!|massive spoiler}}
produces:
[ Show massive spoiler ]
The cake is a lie!