Template:Spoiler/doc: Difference between revisions

From Dragon Quest Wiki
Jump to navigation Jump to search
m 5 revisions: importing Template namespace from Wikia
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 2: Line 2:


==Usage==
==Usage==
This template should be called in pairs so that the contents can be hidden.  One call before spoiler information starts, and one after.
This template should be called in pairs.  One call before spoiler information starts, and one after.
===Start===
===Start===
A spoiler start should be the first invocation of the template.
A spoiler start should be the first invocation of the template.
<pre>{{spoiler|start}}</pre>
<pre>{{spoiler|start|media}}</pre>
*start: A required parameter which marks a section as the start of a spoiler.
*'''start''': A required parameter which marks a section as the start of a spoiler.
*'''media''': An optional parameter which indicates which media the information might be spoiling.
===End===
===End===
A spoiler end should be the second invocation of the template.
A spoiler end should be the second invocation of the template.
<pre>{{spoiler|end}}</pre>
<pre>{{spoiler|end}}</pre>
*end: A required parameter which marks a section as the end of a spoiler.
*'''end''': A required parameter which marks a section as the end of a spoiler.
==Use this template without collapse function==
When you use this template just to show an warning of spoiler, use:
<pre>{{spoiler}}</pre>
Result:
{{spoiler}}


==Example==
==Example==
Line 23: Line 19:
{{spoiler|end}}
{{spoiler|end}}


{{spoiler|start|[[Dragon Quest V]]}}
This is spoiler information.  OMGz!
{{spoiler|end}}


===Code===
===Code===
<pre>
<pre>
{{spoiler|start}}
{{spoiler|start}}
This is spoiler information. OMGz!
Spoiler text goes here.
{{spoiler|end}}
</pre>
<pre>
{{spoiler|start|[[Dragon Quest V]]}}
Spoiler text goes here.
{{spoiler|end}}
{{spoiler|end}}
</pre>
</pre>

Latest revision as of 17:08, 26 February 2026

The spoiler template is used to mark sections of an article which might contain spoiler information.

Usage[edit source]

This template should be called in pairs. One call before spoiler information starts, and one after.

Start[edit source]

A spoiler start should be the first invocation of the template.

{{spoiler|start|media}}
  • start: A required parameter which marks a section as the start of a spoiler.
  • media: An optional parameter which indicates which media the information might be spoiling.

End[edit source]

A spoiler end should be the second invocation of the template.

{{spoiler|end}}
  • end: A required parameter which marks a section as the end of a spoiler.

Example[edit source]

Sample[edit source]

Warning: Spoilers!
Click expand to view content

This is spoiler information. OMGz!


Warning: Spoilers!
This page contains spoilers for Dragon Quest V. Read at your own discretion.
Click expand to view content

This is spoiler information. OMGz!

Code[edit source]

{{spoiler|start}}
Spoiler text goes here.
{{spoiler|end}}
{{spoiler|start|[[Dragon Quest V]]}}
Spoiler text goes here.
{{spoiler|end}}