Template:ExpandBox: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<includeonly><onlyinclude><!-- --> <div class="mw-collapsible {{#ifeq:{{{startcollapsed|1}}}|0||mw-collapsed}}" data-expandtext="{{{expandtext|Expand}}}" data-collapsetext="{{{collapsetext|Collapse}}}" style="border:1px rgba(255,255,255,0.2) solid; overflow:auto; float:{{{side|none}}}; display: table-cell; {{{style|}}}"><!-- --><strong>{{{title|{{{2|}}}}}}{{#if:{{{title|}}}{{{2|}}}| |<br>}}</strong><!-- --><div class="mw-collapsible-content" style="max-width:83em;...") |
(No difference)
|
Latest revision as of 07:53, 4 January 2025
Template Documentation [edit]
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.)
Parameters
- {{{1}}} - The content that should be collapsible.
- {{{title}}} - The headline text of the ExpandBox.
- {{{side}}} - Where this ExpandBox should float, i.e. "left" or "right". Does not float by default. If it floats, one can use {{clr}} to clear vertical space.
- {{{expandtext}}} - The text that must be clicked to show {{{1}}}. Default is "Expand".
- {{{collapsetext}}} - The text that must be clicked to hide {{{1}}}. Default is "Collapse".
- {{{startcollapsed}}} - If set to 0, the content is initially visible, otherwise collapsed. Default is 1.
- {{{style}}} - Additional style parameters for the outer <div>.
Examples
| Wikitext | Result |
|---|---|
Previous text.
{{ExpandBox |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
|
Previous text.
Subsequent text. |
Previous text.
{{ExpandBox
|startcollapsed=0
|
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
|
Previous text.
Subsequent text. |
Previous text.
{{ExpandBox
|expandtext=Show
|collapsetext=Hide
|
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
|
Previous text.
Subsequent text. |
Previous text.
{{ExpandBox
|side=right
|
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
|
Previous text.
Subsequent text. |
Previous text.
{{ExpandBox
|title=Example for an ExpandBox
|
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
|
Previous text.
Example for an ExpandBox
Subsequent text. |