Template:Collapse: Difference between revisions

Template page
No edit summary
Tag: Manual revert
No edit summary
Tag: wikieditor
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
Hide things behind a button.
{{:Template:Collapse/Doc}}
==Usage==
::<code><nowiki>{{Collapse</nowiki></code><br>
::<code>|name=|</code><br>
::<code>(hidden things)</code><br>
::<code>}}</code></code>


==Important==
<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>
When using this template with MediaWiki formatting, use the [https://www.mediawiki.org/wiki/Help:Magic_words#Other Magic Word] <code><nowiki>{{!}}</nowiki></code> instead of <code><nowiki>|</nowiki></code>.
<div class="mw-collapsible mw-collapsed" style="margin-top:-25px;overflow:auto;" id="mw-customcollapsible-{{{id}}}">&emsp;{{{1}}}</div><includeonly></onlyinclude>
 
<onlyinclude><includeonly><span class="mw-customtoggle-{{{name}}}"><span style="display:block"><h3 style="display:inline;">{{{name}}}</h3></span></span>
<div class="mw-collapsible mw-collapsed" style="margin-left:50px; margin-top:-25px; overflow:auto;" id="mw-customcollapsible-{{{name}}}">{{{1}}}</div>
 
<div style="margin-top:15px;"> </div>
<includeonly></onlyinclude>

Latest revision as of 18:30, 7 September 2023

Use Tabs instead.

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.

Example

----
{{Collapse
|name=Show My Cool Table And Shit
|id=page_show_my_cool_table|
Here is my cool table guice:
{{{!}} class{{=}}"wikitable"
! Header 1 !! Header 2
{{!}}-
{{!}} Cool stuff {{!}}{{!}} Awesome
{{!}}-
{{!}} Less rad stuff {{!}}{{!}} Still awesome
{{!}}-
{{!}} 🦟 {{!}}{{!}} 💩
{{!}}}
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?