Template:ExpandBox/doc

From Valve Developer Community
< Template:ExpandBox
Revision as of 10:46, 7 May 2021 by Popcorn (talk | contribs) (Added example text before and after each ExpandBox to visualize text alignment and split starterlinebreak and noendlinebreak into two examples.)
Jump to navigation Jump to search
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.)

Example usage
Parameter Wikitext Result
None
Previous text.
{{ExpandBox |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
Previous text.

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

starterlinebreak
Previous text.
{{ExpandBox | starterlinebreak=1 |
* Sample
* Enumeration
* Worth
* Hiding
}}
Subsequent text.
Note.pngNote: starterlinebreak can be replaced with startinglinebreak.
Previous text.

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

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

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

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

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

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

  • Sample
  • Enumeration
  • Worth
  • Hiding

Subsequent text.

The second unnamed parameter is the title.
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.