Template:Show: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly>< |
<includeonly><div class="mw-collapsible {{#ifeq:{{lc:{{{state|collapsed}}}}}|expanded||mw-collapsed}}" |
||
data-expandtext="{{{expandtext|more ▾}}}" |
data-expandtext="{{{expandtext|more ▾}}}" |
||
data-collapsetext="{{{collapsetext|less ▴}}}" |
data-collapsetext="{{{collapsetext|less ▴}}}" |
||
style="{{ |
style="{{{style|}}}"> |
||
< |
<div class="mw-collapsible-content"> |
||
{{{text|}}} |
{{{text|}}} |
||
</div> |
|||
</ |
</div></includeonly><noinclude> |
||
== Usage == |
== Usage == |
||
A simple collapsible block for hiding/showing content. |
|||
<pre> |
<pre> |
||
{{show |
|||
{{Expand summary |
|||
|text=The primary driver for the acquisition was the target's proprietary AI technology. |
|||
|text=Your long summary here. |
|||
}} |
}} |
||
</pre> |
</pre> |
||
== |
== Custom Labels == |
||
To change the "more" and "less" buttons: |
|||
<pre> |
<pre> |
||
{{show |
|||
{{Expand summary |
|||
|expandtext=Read Bio |
|||
|inline=yes |
|||
|collapsetext=Close |
|||
|text=Your continuation text here. |
|||
|text=John Doe has been the CEO since 2010... |
|||
}} |
}} |
||
</pre> |
</pre> |
||
== Parameters == |
|||
* '''text''': The content to be hidden/shown. |
|||
* '''expandtext''': The text for the "show" link (Defaults to "more ▾"). |
|||
* '''collapsetext''': The text for the "hide" link (Defaults to "less ▴"). |
|||
* '''state''': Set to "expanded" to have the text visible on page load. |
|||
* '''style''': Pass additional CSS styles directly to the container. |
|||
[[Category:Generic templates]] |
|||
</noinclude> |
</noinclude> |
||
Latest revision as of 17:51, 21 December 2025
Usage
A simple collapsible block for hiding/showing content.
{{show
|text=The primary driver for the acquisition was the target's proprietary AI technology.
}}
Custom Labels
To change the "more" and "less" buttons:
{{show
|expandtext=Read Bio
|collapsetext=Close
|text=John Doe has been the CEO since 2010...
}}
Parameters
- text: The content to be hidden/shown.
- expandtext: The text for the "show" link (Defaults to "more ▾").
- collapsetext: The text for the "hide" link (Defaults to "less ▴").
- state: Set to "expanded" to have the text visible on page load.
- style: Pass additional CSS styles directly to the container.