Collapse and expand wiki page content: Difference between revisions

Matt (talk | contribs)
Matt (talk | contribs)
 
Line 272: Line 272:
Its purpose is specifically hiding spoiler-like content. MediaWiki
Its purpose is specifically hiding spoiler-like content. MediaWiki
<spoiler show="showMessage" hide="hideMessage">Spoiler Text</spoiler>
<spoiler show="showMessage" hide="hideMessage">Spoiler Text</spoiler>
<syntaxhighilght lang="html"><spoiler show="showMessage" hide="hideMessage">Spoiler Text</spoiler></syntaxhighlight>
<syntaxhighlight lang="html"><spoiler show="showMessage" hide="hideMessage">Spoiler Text</spoiler></syntaxhighlight>


=== MediaWiki custom template ===
=== MediaWiki custom template ===
One other possibility is creating your own <code><nowiki>{{Collapse}}</nowiki></code> template around MediaWiki's built-in functionality. MediaWiki.org itself has a Collapse template with parameters such as <code>title</code>, <code>content</code>, background, alignment, and initial state. MediaWiki
One other possibility is creating your own <code><nowiki>{{Collapse}}</nowiki></code> template around MediaWiki's built-in functionality. MediaWiki.org itself has a Collapse template with parameters such as <code>title</code>, <code>content</code>, background, alignment, and initial state. MediaWiki