Dare to try out the Harvest Festival 2024!?
Template:Collapsible: Difference between revisions
From HorizonXI Wiki
mNo edit summary |
m (added note about other collapsible templates) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span class="mw-collapsible mw-collapsed"><span class="mw-collapsible-content">{{{1}}}</span></span></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__ | |||
<pre>The next piece of text is | ==Usage== | ||
The next piece of text | |||
===Inline Text=== | |||
<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 can be collapsed: {{ Collapsible | this can be collapsed | state=expanded}} | |||
===Lists=== | |||
Lists need an extra linebreak between the template call and the list element that is supposed to be hidden | |||
<pre>*Information here {{ Collapsible | | |||
**more information here | |||
}} | |||
*more list stuff</pre> | |||
*Information here {{ Collapsible | | *Information here {{ Collapsible | | ||
**more 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 |
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