Difference between revisions of "Template:Spoiler"

From IOP Wiki
Jump to navigation Jump to search
(Redesign for WikiMessageBox Template)
(Bypassing unwanted line feeds)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly>{{WikiMessageBox
{{WikiMessageBox
 
 
|image=helialprofile.png
 
|image=helialprofile.png
 
|quote=This is classified information!
 
|quote=This is classified information!
 
|text=This article contains spoilers. You have been warned. {{#if:{{{target|}}}|Click [[#{{{target|}}}|here]] to skip this part.|}}
 
|text=This article contains spoilers. You have been warned. {{#if:{{{target|}}}|Click [[#{{{target|}}}|here]] to skip this part.|}}
}}
+
}}</includeonly><noinclude>
</includeonly>
+
{{Documentation}}
 
 
<noinclude>
 
{{Spoiler}}
 
 
 
{{Spoiler|target=name_of_anchor}}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 14:30, 5 December 2020

Documentation icon Template documentation[view] [edit] [history] [purge]

Creates a box spreading the width of the page warning the user of possible spoilers in the following text.

Parameters[edit]

Parameter name Required? Default value Description
target No (n/a) Optional HTML anchor which will be linked for the user to skip a text passage

Usage[edit]

See the template's testcases:

No parameter
Wiki code {{Spoiler}}
Main version
helialprofile.png

"This is classified information!"

This article contains spoilers. You have been warned.


Sandbox version Template:Spoiler/sandbox
Parameter: target
Wiki code {{Spoiler|target=name_of_anchor}}
Main version
helialprofile.png

"This is classified information!"

This article contains spoilers. You have been warned. Click here to skip this part.


Sandbox version Template:Spoiler/sandbox

See also[edit]