Template:ExpandBox/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Removed starterlinebreak since it had no effect and was unused on all pages. Added Parameters section.)
m (Category:Layout Container)
Line 42: Line 42:
Subsequent text.</pre>
Subsequent text.</pre>
| Previous text.
| Previous text.
{{ExpandBox | noendlinebreak=1 |  
{{ExpandBox | noendlinebreak=1 |
* Sample
* Sample
* Enumeration
* Enumeration
Line 106: Line 106:
<includeonly>
<includeonly>
{{sandbox other||
{{sandbox other||
[[Category:Layout Container]]
<!-- Categories below this line, please -->
<!-- Categories below this line, please -->
}}</includeonly>
}}</includeonly>

Revision as of 07:31, 31 October 2021

Edit-copy.png
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.

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.

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

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

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

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

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

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

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

Previous text.
{{ExpandBox |
* Sample
* Enumeration
* Worth
* Hiding
| Example for an ExpandBox
}}
Subsequent text.
Previous text.
Example for an ExpandBox  
  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.