Difference between revisions of "Template:ExpandBox"

From Valve Developer Community
Jump to: navigation, search
m (screw it, adding in the alias of "nostarterlinebreak" - "nostartinglinebreak")
m ("nostartinglinebreak" sucks, now turned into "startinglinebreak")
 
Line 1: Line 1:
<includeonly>{{#if:{{{nostarterlinebreak|}}}{{{nostartinglinebreak|}}}||<br clear="all">}}
+
<includeonly>{{#if:{{{starterlinebreak|}}}{{{startinglinebreak|}}}|<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

Latest revision as of 03:48, 6 May 2021


Template icon Template documentation[view] [edit] [history] [purge]

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
Parameter Wikitext Result
None
Previous text.
{{ExpandBox |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
Previous text.

Subsequent text.

starterlinebreak
Previous text.
{{ExpandBox | starterlinebreak=1 |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
Note.png Note:  starterlinebreak can be replaced with startinglinebreak.
Previous text.



Subsequent text.

noendlinebreak
Previous text.
{{ExpandBox | noendlinebreak=1 |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
Previous text.

Subsequent text.

expandtext
collapsetext
Previous text.
{{ExpandBox | expandtext=Show | collapsetext=Hide |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
Previous text.

Subsequent text.

side
Previous text.
{{ExpandBox | side=right |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
Previous text.

Subsequent text.

The second unnamed parameter is the title.
Previous text.
{{ExpandBox |
* Sample
* Enumeration
* Worth
* Hiding
| Example for an ExpandBox
}}
Subsequent text.
Previous text.
Example for an ExpandBox

Subsequent text.