Template:Spoiler: Difference between revisions

From Step Mods | Change The Game
mNo edit summary
mNo edit summary
Line 7: Line 7:
{{{hidden}}}</div><!--
{{{hidden}}}</div><!--
--></div><!--
--></div><!--
--></includeonly><noinclude>__NOTOC____NOTITLE__ [[Category:Instruction Templates]][[Category:Formatting Templates]][[Category:Layout Templates]]
--></includeonly><noinclude>__NOTOC__ [[Category:Instruction Templates]][[Category:Formatting Templates]][[Category:Layout Templates]][https://stepmodifications.org/forum/topic/5882-spoiler/ '''Forum Topic''']


==Purpose & Usage==
==Purpose & Usage==

Revision as of 05:01, October 5, 2023

Forum Topic

Purpose & Usage[edit source]

This allows a title to be clicked like a spoiler to show expandedhidden content beneath the title.

Template parameters

ParameterDescriptionTypeStatus
shownshown

The instruction title

Example
Descriptive title like: "Steps to Perform Clean Install"
Stringrequired
hiddenhidden

Expanded content

Example
Assorted content (list, paragraph, etc.)
Contentrequired

Examples[edit source]

Code:

{{Spoiler|shown=Instructions|hidden=Hidden content}}

Result:

➕ [Click to show]➖ [Click to hide] Instructions
Hidden content

Code:

{{Spoiler|shown=Procedure|hidden=# Beginning with a list now works.
#*You can nest different types of lists.
#*:It Just Works!}}

Result:

➕ [Click to show]➖ [Click to hide] Procedure
  1. Beginning with a list now works.
    • You can nest different types of lists.
      It Just Works!

Code:

{{Spoiler|shown=A Process|hidden= ===Include a heading===
Headings now work on the first line with no extra things in front of it.}}

Result:

➕ [Click to show]➖ [Click to hide] A Process

Include a heading

Headings now work on the first line with no extra things in front of it.

Known Issues[edit source]

  • Incompatible with CSS extension

See Also[edit source]