Template:ExpandBox/doc: Difference between revisions
Jump to navigation
Jump to search
(Added example text before and after each ExpandBox to visualize text alignment and split starterlinebreak and noendlinebreak into two examples.) |
(Removed starterlinebreak since it had no effect and was unused on all pages. Added Parameters section.) |
||
Line 2: | Line 2: | ||
<!-- 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 text that should be collapsed initially. | |||
* {{param|2}} - The title of the ExpandBox. | |||
* {{param|side}} - Where this ExpandBox should float. Default is "left". | |||
* {{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|noendlinebreak}} - Set to 1 to have subsequent text float around this ExpandBox. | |||
=== Examples === | |||
{| class="standard-table" style="width:100%;" | {| class="standard-table" style="width:100%;" | ||
! style="width:50%;" | Wikitext | |||
! style="width:50%;" | Result | |||
! style="width: | |||
! style="width: | |||
|- | |- | ||
| <pre>Previous text. | | <pre>Previous text. | ||
{{ExpandBox | | {{ExpandBox | | ||
Line 26: | Line 33: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| <pre>Previous text. | | <pre>Previous text. | ||
{{ExpandBox | noendlinebreak=1 | | {{ExpandBox | noendlinebreak=1 | | ||
Line 62: | Line 50: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| <pre>Previous text. | | <pre>Previous text. | ||
{{ExpandBox | expandtext=Show | collapsetext=Hide | | {{ExpandBox | expandtext=Show | collapsetext=Hide | | ||
Line 80: | Line 67: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| <pre>Previous text. | | <pre>Previous text. | ||
{{ExpandBox | side=right | | {{ExpandBox | side=right | | ||
Line 98: | Line 84: | ||
Subsequent text. | Subsequent text. | ||
|- | |- | ||
| <pre>Previous text. | | <pre>Previous text. | ||
{{ExpandBox | | {{ExpandBox | | ||
Line 120: | Line 105: | ||
<includeonly> | <includeonly> | ||
{{sandbox other|| | {{sandbox other|| | ||
<!-- Categories below this line, please --> | <!-- Categories below this line, please --> | ||
}}</includeonly> | }}</includeonly> |
Revision as of 06:42, 10 October 2021

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 text that should be collapsed initially.
- {{{2}}} - The title of the ExpandBox.
- {{{side}}} - Where this ExpandBox should float. Default is "left".
- {{{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".
- {{{noendlinebreak}}} - Set to 1 to have subsequent text float around this ExpandBox.
Examples
Wikitext | Result |
---|---|
Previous text. {{ExpandBox | * Sample * Enumeration * Worth * Hiding }} Subsequent text. |
Previous text.
Subsequent text. |
Previous text. {{ExpandBox | noendlinebreak=1 | * 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 | * Sample * Enumeration * Worth * Hiding | Example for an ExpandBox }} Subsequent text. |
Previous text.
Example for an ExpandBox
Subsequent text. |