Template:Collapsible: Difference between revisions
From HorizonXI Wiki
(added option to be expanded by default and extended documentation) |
m (added note about other collapsible templates) |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude><span class="mw-collapsible {{#switch:{{{state|}}}|expanded=|collapsed=mw-collapsed|#default=mw-collapsed}}"><span class="mw-collapsible-content">{{{1}}}</span></span></onlyinclude></includeonly> | <includeonly><onlyinclude><span class="mw-collapsible {{#switch:{{{state|}}}|expanded=|collapsed=mw-collapsed|#default=mw-collapsed}}"><span class="mw-collapsible-content">{{{1}}}</span></span></onlyinclude></includeonly> | ||
__NOTOC__ | |||
==Usage== | ==Usage== | ||
Line 21: | Line 21: | ||
}} | }} | ||
*more list stuff | *more list stuff | ||
===See also=== | |||
[[:Template:Collapsible Toggle]] and [[:Template:Collapsible Content]] if you want to place the toggle independently of the content thats going to be collapsed. | |||
==Editing this template== | ==Editing this template== |
Latest revision as of 18:31, 27 November 2023
Usage
Inline Text
The next piece of text can be collapsed but is by default expanded: {{ Collapsible | this can be collapsed | state=expanded}}
The next piece of text can be collapsed: this can be collapsed
Lists
Lists need an extra linebreak between the template call and the list element that is supposed to be hidden
*Information here {{ Collapsible | **more information here }} *more list stuff
- Information here
- more information here
- more list stuff
See also
Template:Collapsible Toggle and Template:Collapsible Content if you want to place the toggle independently of the content thats going to be collapsed.
Editing this template
Further info can be found at
- https://www.mediawiki.org/wiki/Manual:Collapsible_elements
- https://www.mediawiki.org/wiki/Manual:Collapsible_elements/Demo/Advanced
e.g. to add custom placement of the toggle element