📌 Current mission: start filling the wiki — create pages, upload images, and join the Discord!

Template:Spoiler: Difference between revisions

From Asylum Wiki
Jump to navigationJump to search
m Protected "Template:Spoiler": High-use template — admin only ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
Fix: use mw-collapsible instead of raw details/summary (was rendering as text)
 
Line 1: Line 1:
<includeonly><details class="asy-spoiler"><summary>{{{title|Spoiler — click to reveal}}}</summary>
<includeonly><div class="mw-collapsible mw-collapsed asy-spoiler"><div class="asy-spoiler-title">{{{title|Spoiler — click to reveal}}}</div><div class="mw-collapsible-content">
{{{1|{{{text|}}}}}}
{{{1|{{{text|}}}}}}
</details></includeonly><noinclude>
</div></div></includeonly><noinclude>
Click-to-reveal box for spoilers, lore twists, or long tangents you don't want blocking the page.
Click-to-reveal box for spoilers, lore twists, or long tangents you don't want blocking the page. Uses MediaWiki's built-in collapsible box (not raw HTML), so it works reliably in every skin.


'''Example:''' <code><nowiki>{{Spoiler|title=What happens at the end|The wiki gets finished and everyone is happy.}}</nowiki></code>
'''Example:''' <code><nowiki>{{Spoiler|title=What happens at the end|The wiki gets finished and everyone is happy.}}</nowiki></code>

Latest revision as of 19:30, 12 July 2026

Click-to-reveal box for spoilers, lore twists, or long tangents you don't want blocking the page. Uses MediaWiki's built-in collapsible box (not raw HTML), so it works reliably in every skin.

Example: {{Spoiler|title=What happens at the end|The wiki gets finished and everyone is happy.}}

What happens at the end

The wiki gets finished and everyone is happy.

Collapsible click-to-reveal spoiler box.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Hidden content1 text

no description

Contentrequired
Visible labeltitle

Text shown before it's clicked open

Default
Spoiler — click to reveal
Stringoptional