Template:ExpandBox/doc: Difference between revisions
Jump to navigation
Jump to search
(/doc version of ExpandBox template) |
Thunder4ik (talk | contribs) m (→top: clean up, replaced: {{Documentation subpage → {{Doc/subpage) |
||
(8 intermediate revisions by 2 users 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 === | |||
* {{param|1}} - The content that should be collapsible. | |||
* {{param|title}} - The headline text of the ExpandBox. | |||
* {{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|collapsetext}} - The text that must be clicked to hide {{param|1}}. Default is "Collapse". | |||
* {{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 === | |||
{| class="standard-table" style="width:100%;" | {| class="standard-table" style="width:100%;" | ||
! style=width:50%| Wikitext | |||
! style= | ! style=width:50%| Result | ||
! style= | |||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox {{!}} | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* Worth | * Worth | ||
* Hiding | * Hiding | ||
}} | }} | ||
| {{ExpandBox | | Subsequent text.}} | ||
| Previous text. | |||
{{ExpandBox | | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 19: | Line 32: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | |||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | |||
|startcollapsed{{=}}0 | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* Worth | * Worth | ||
* Hiding | * Hiding | ||
}} | }} | ||
| {{ExpandBox | | Subsequent text.}} | ||
| Previous text. | |||
{{ExpandBox | |||
|startcollapsed=0 | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 32: | Line 53: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | |||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | |||
|expandtext{{=}}Show | |||
|collapsetext{{=}}Hide | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* | * Worth | ||
* Hiding | * Hiding | ||
}} | }} | ||
| {{ExpandBox | expandtext=Show | collapsetext=Hide | | Subsequent text.}} | ||
| Previous text. | |||
{{ExpandBox | |||
|expandtext=Show | |||
|collapsetext=Hide | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 45: | Line 76: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | |||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | |||
|side{{=}}right | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* Worth | * Worth | ||
* Hiding | * Hiding | ||
}} | }} | ||
| {{ExpandBox | side=right | | Subsequent text.}} | ||
| Previous text. | |||
{{ExpandBox | |||
|side=right | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
Line 58: | Line 97: | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | |||
|- | |- | ||
| | | {{pre|Previous text. | ||
{{ExpandBox | |||
|title{{=}}Example for an ExpandBox | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* Worth | * Worth | ||
* Hiding | * Hiding | ||
}} | |||
}} | Subsequent text.}} | ||
| {{ExpandBox | | | Previous text. | ||
{{ExpandBox | |||
|title=Example for an ExpandBox | |||
| | |||
* Sample | * Sample | ||
* Enumeration | * Enumeration | ||
* Worth | * Worth | ||
* Hiding | * Hiding | ||
}} | }} | ||
Subsequent text. | |||
|} | |} | ||
<includeonly> | <includeonly> | ||
{{sandbox other|| | {{sandbox other|| | ||
[[Category:Layout Container]] | |||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
}}</includeonly> | }}</includeonly> |
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. |