Template:Collapse: Difference between revisions

Template page
No edit summary
No edit summary
Line 53: Line 53:
----
----


<onlyinclude><includeonly><span class="mw-customtoggle-{{{id}}}"><span style="display:block"><span style="color:var(--color-primary);font-size:1em;font-weight:bold;display:inline">{{{name}}}</span></span>
<onlyinclude><includeonly><span class="mw-customtoggle-{{{id}}}"><span style="display:block"><span style="color:var(--color-primary);font-weight:bold;display:inline">{{{name}}}</span></span>
<div class="mw-collapsible mw-collapsed" style="margin-top:-25px;overflow:auto;" id="mw-customcollapsible-{{{id}}}">&emsp;{{{1}}}</div>
<div class="mw-collapsible mw-collapsed" style="margin-top:-25px;overflow:auto;" id="mw-customcollapsible-{{{id}}}">&emsp;{{{1}}}</div>
<includeonly></onlyinclude>
<includeonly></onlyinclude>

Revision as of 16:14, 8 February 2023

Hide things behind a button.

Usage

{{Collapse
|name=
|id=|
(hidden things)
}}

Important

|id=| must contain a unique name (it is wiki wide) with no spaces.

If the content inside the button contains:

  • |, use {{!}} instead.
  • =, use {{=}} instead.
  • HTML tags, see Magic Words.

Example

----
{{Collapse
|name=Show My Cool Table And Shit
|id=page_show_my_cool_table|
Here is my cool table guice:<br>
{{{!}} class{{=}}"wikitable"
! Header 1 !! Header 2
{{!}}-
{{!}} Cool stuff {{!}}{{!}} Awesome
{{!}}-
{{!}} Less rad stuff {{!}}{{!}} Still awesome
{{!}}-
{{!}} 🦟 {{!}}{{!}} 💩
{{!}}}
{{#tag:br}}Wat you guys think?
}}
----

Result:


Show My Cool Table And Shit

Here is my cool table guice:

Header 1 Header 2
Cool stuff Awesome
Less rad stuff Still awesome
🦟 💩


Wat you guys think?