Template:ExpandBox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (added '<br clear="all">' at the very end of the template; ExpandBox shouldn't interfere with text flow weirdly anymore)
m (screw it, ill also add a '<br clear="all">' to the top of this template)
Line 60: Line 60:
}}
}}
|}
|}
</noinclude><includeonly>
</noinclude><includeonly><br clear="all">
<div class="mw-collapsible mw-collapsed" data-expandtext="{{#If:{{{expandtext|}}}|{{{expandtext}}}|Expand}}" data-collapsetext="{{#If:{{{collapsetext|}}}|{{{collapsetext}}}|Collapse}}" style="border:1px grey solid; overflow:auto; float:{{#switch:{{lc:{{{side}}}}}
<div class="mw-collapsible mw-collapsed" data-expandtext="{{#If:{{{expandtext|}}}|{{{expandtext}}}|Expand}}" data-collapsetext="{{#If:{{{collapsetext|}}}|{{{collapsetext}}}|Collapse}}" style="border:1px grey solid; overflow:auto; float:{{#switch:{{lc:{{{side}}}}}
| left        = left
| left        = left

Revision as of 09:43, 24 April 2021

This template is intended for very long lists that aren't significant enough to warrant their own page, but also end up making pages ridiculously long. Works fine even if used multiple times on a page. (Also, won't interfere with TOCs.)

Example usage
Wikitext Result
{{ExpandBox |
* Sample
* Enumeration
* Worth
* Hiding
}}


{{ExpandBox | expandtext=Show | collapsetext=Hide |
* Sample
* Enumeration
* Worth
* Hiding
}}


{{ExpandBox | side=right |
* Sample
* Enumeration
* Worth
* Hiding
}}


{{ExpandBox |
* Sample
* Enumeration
* Worth
* Hiding
| Example for an ExpandBox
}}

Example for an ExpandBox