Template:ExpandBox/doc: Difference between revisions
Jump to navigation
Jump to search
m (Category:Layout Container) |
Thunder4ik (talk | contribs) m (→top: clean up, replaced: {{Documentation subpage → {{Doc/subpage) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{ | {{Doc/subpage}} | ||
<!-- Please place categories where indicated at the bottom of this page. | <!-- Please place categories where indicated at the bottom of this page. --> | ||
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.) | 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 === | === Parameters === | ||
* {{param|1}} - The | * {{param|1}} - The content that should be collapsible. | ||
* {{param| | * {{param|title}} - The headline text of the ExpandBox. | ||
* {{param|side}} - Where this ExpandBox should float. | * {{param|side}} - Where this ExpandBox should float, i.e. "left" or "right". Does not float by default. If it floats, one can use {{tl2|clr}} to clear vertical space. | ||
* {{param|expandtext}} - The text that must be clicked to show {{param|1}}. Default is "Expand". | * {{param|expandtext}} - The text that must be clicked to show {{param|1}}. Default is "Expand". | ||
* {{param|collapsetext}} - The text that must be clicked to hide {{param|1}}. Default is "Collapse". | * {{param|collapsetext}} - The text that must be clicked to hide {{param|1}}. Default is "Collapse". | ||
* {{param| | * {{param|startcollapsed}} - If set to 0, the content is initially visible, otherwise collapsed. Default is 1. | ||
* {{param|style}} - Additional style parameters for the outer <div>. | |||
=== Examples === | === Examples === | ||
{| class="standard-table" style="width:100%;" | {| class="standard-table" style="width:100%;" | ||
! style= | ! style=width:50%| Wikitext | ||
! style= | ! style=width:50%| Result | ||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | {{ExpandBox {{!}} | ||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 23: | Line 24: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | Subsequent text.}} | ||
| Previous text. | | Previous text. | ||
{{ExpandBox | | {{ExpandBox | | ||
Line 33: | Line 34: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | {{ExpandBox | ||
|startcollapsed{{=}}0 | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 40: | Line 43: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | Subsequent text.}} | ||
| Previous text. | | Previous text. | ||
{{ExpandBox | | {{ExpandBox | ||
|startcollapsed=0 | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 50: | Line 55: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | {{ExpandBox | ||
|expandtext{{=}}Show | |||
|collapsetext{{=}}Hide | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 57: | Line 65: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | Subsequent text.}} | ||
| Previous text. | | Previous text. | ||
{{ExpandBox | expandtext=Show | collapsetext=Hide | | {{ExpandBox | ||
|expandtext=Show | |||
|collapsetext=Hide | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 67: | Line 78: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | {{ExpandBox | ||
|side{{=}}right | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 74: | Line 87: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | Subsequent text.}} | ||
| Previous text. | | Previous text. | ||
{{ExpandBox | side=right | | {{ExpandBox | ||
|side=right | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 84: | Line 99: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | {{ExpandBox | ||
|title{{=}}Example for an ExpandBox | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* Worth | * Worth | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | Subsequent text.}} | ||
| Previous text. | | Previous text. | ||
{{ExpandBox | | {{ExpandBox | ||
|title=Example for an ExpandBox | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* Worth | * Worth | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | Subsequent text. |
Latest revision as of 02:15, 12 January 2024

This is a documentation subpage for Template:ExpandBox.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
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. |