- Portals
- The Current Year
- ED in the News
- Admins
- Help ED Rebuild
- Archive
- ED Bookmarklet
- Donate Bitcoin
Contact an admin on Discord or EDF if you want an account. Also fuck bots.
Template:Collapseobject: Difference between revisions
Jump to navigation
Jump to search
imported>TabbyGarf No edit summary |
m Text replacement - "|{{PAGENAME}}]]" to "]]" |
||
| (26 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<noinclude>This is the collapsing object template. See [[Encyclopedia Dramatica:Collapsing Objects]] for an explanation.</noinclude><includeonly><span class="collapsibletoggle">[<span class="mw-customtoggle-{{{1}}} showhidetext"><span class="collapsibletoggletext hiddentext">{{{2}}}</span><span class="collapsibletoggletext">{{{3}}}</span></span>]</span><br />{{#if:{{{5|}}}| <div id="mw-customcollapsible-{{{1}}}" class="mw-collapsible {{#switch:{{{4}}} | <noinclude>This is the collapsing object template. See [[Encyclopedia Dramatica:Collapsing Objects]] for an explanation.</noinclude><includeonly><span class="collapsibletoggle">[<span class="mw-customtoggle-{{{1}}} showhidetext"><span class="collapsibletoggletext {{#switch:{{{4}}} | ||
|0=hiddentext | |||
|1= | |||
|#default=hiddentext | |||
}}">{{{2}}}</span><span class="collapsibletoggletext {{#switch:{{{4}}} | |||
|0= | |||
|1=hiddentext | |||
|#default= | |||
}}">{{{3}}}</span></span>]</span><br />{{#if:{{{5|}}}| <div id="mw-customcollapsible-{{{1}}}" class="mw-collapsible {{#switch:{{{4}}} | |||
|0=mw-collapsed | |0=mw-collapsed | ||
|1= | |1= | ||
| Line 31: | Line 39: | ||
<pre> | <pre> | ||
Visible: {{collapseobject|vis| | Visible: {{collapseobject|vis|+|-|1|This is content is visible.|background-color:red;color:white;}} | ||
Hidden: {{collapseobject|hid| | Hidden: {{collapseobject|hid|+|-|0|This is content hidden.|background-color:blue;color:white;}} | ||
The last two arguments are omitted: {{collapseobject|ex| | The last two arguments are omitted: {{collapseobject|ex|+|-|1}} | ||
<div class="ex" style="color:white;"> | <div class="ex" style="color:white;"> | ||
The last two arguments are omitted. | The last two arguments are omitted. | ||
| Line 43: | Line 51: | ||
===Output=== | ===Output=== | ||
Visible: {{collapseobject|vis| | Visible: {{collapseobject|vis|+|-|1|This is content is visible.|background-color:red;color:white;}} | ||
Hidden: {{collapseobject|hid| | Hidden: {{collapseobject|hid|+|-|0|This is content hidden.|background-color:blue;color:white;}} | ||
The last two arguments are omitted: {{collapseobject|ex| | The last two arguments are omitted: {{collapseobject|ex|+|-|1}} | ||
<div class="ex" style="font-size:25pt;"> | <div class="ex" style="font-size:25pt;"> | ||
The last two arguments are omitted. | The last two arguments are omitted. | ||
</div> | </div> | ||
[[Category:Formatting Templates | [[Category:Formatting Templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 01:31, 11 January 2026
This is the collapsing object template. See Encyclopedia Dramatica:Collapsing Objects for an explanation.
Usage
{{collapseobject| 1 | 2 | 3 | 4 }}
| 1 | 2 | 3 | 4 |
|---|---|---|---|
| A unique text id | Text for "expand content" link | Text for "hide content" link | Initial state of collapsing content. Enter anything to cause collapsing content to be visible initially. 1 = visible, 0 = hidden |
{{collapseobject| 1 | 2 | 3 | 4 | 5 | 6 }}
| 5 | 6 |
|---|---|
| Hidden content | css for hidden content. Do not include style=" " |
Example
Visible: {{collapseobject|vis|+|-|1|This is content is visible.|background-color:red;color:white;}}
Hidden: {{collapseobject|hid|+|-|0|This is content hidden.|background-color:blue;color:white;}}
The last two arguments are omitted: {{collapseobject|ex|+|-|1}}
<div class="ex" style="color:white;">
The last two arguments are omitted.
</div>
Output
Visible: [+]
This is content is visible.
Hidden: [-]
This is content hidden.
The last two arguments are omitted: [+]
The last two arguments are omitted.