Dare to try out the Harvest Festival 2024!?
Template:Collapsible: Difference between revisions
From HorizonXI Wiki
m (extended documentation) |
(added option to be expanded by default and extended documentation) |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude><span class="mw-collapsible 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> | ||
==Usage== | ==Usage== | ||
Line 5: | Line 5: | ||
===Inline Text=== | ===Inline Text=== | ||
<pre>The next piece of text is | <pre>The next piece of text can be collapsed but is by default expanded: {{ Collapsible | this can be collapsed | state=expanded}}</pre> | ||
The next piece of text | The next piece of text can be collapsed: {{ Collapsible | this can be collapsed | state=expanded}} | ||
===Lists=== | ===Lists=== | ||
Line 12: | Line 12: | ||
Lists need an extra linebreak between the template call and the list element that is supposed to be hidden | Lists need an extra linebreak between the template call and the list element that is supposed to be hidden | ||
<pre> | <pre>*Information here {{ Collapsible | | ||
**more information here | |||
}} | |||
*more list stuff</pre> | |||
*Information here {{ Collapsible | | *Information here {{ Collapsible | | ||
Line 18: | Line 21: | ||
}} | }} | ||
*more list stuff | *more list stuff | ||
==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 |
Revision as of 10:50, 9 September 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
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