Jump to content

Template:Show: Difference between revisions

From Insurer Brain
Content deleted Content added
Created page with "<includeonly><{{#ifeq:{{{inline|}}}|yes|span|div}} class="mw-collapsible {{#ifeq:{{lc:{{{state|collapsed}}}}}|expanded||mw-collapsed}}" data-expandtext="{{{expandtext|more ▾}}}" data-collapsetext="{{{collapsetext|less ▴}}}" style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}"> <{{#ifeq:{{{inline|}}}|yes|span|div}} class="mw-collapsible-content" style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}"> {{{text|}}}</{{#ifeq:{{{inline|}}}|yes|span|div}}> </{{#ifeq:{{{inline|}..."
 
No edit summary
Line 2: Line 2:
data-expandtext="{{{expandtext|more ▾}}}"
data-expandtext="{{{expandtext|more ▾}}}"
data-collapsetext="{{{collapsetext|less ▴}}}"
data-collapsetext="{{{collapsetext|less ▴}}}"
style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}">
style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}{{#ifeq:{{{compact|}}}|yes|display:inline-block;}} {{{style|}}}">
<{{#ifeq:{{{inline|}}}|yes|span|div}} class="mw-collapsible-content" style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}">
<{{#ifeq:{{{inline|}}}|yes|span|div}} class="mw-collapsible-content" style="{{#ifeq:{{{inline|}}}|yes|display:inline;}}">
{{{text|}}}</{{#ifeq:{{{inline|}}}|yes|span|div}}>
{{{text|}}}</{{#ifeq:{{{inline|}}}|yes|span|div}}>
</{{#ifeq:{{{inline|}}}|yes|span|div}}></includeonly><noinclude>
</{{#ifeq:{{{inline|}}}|yes|span|div}}></includeonly><noinclude>
== Usage ==
== Usage ==
Standard block usage (useful for bios or financial breakdowns):
Standard block usage (floats toggle to the right):
<pre>
<pre>
{{show
{{show
|text=The primary driver for the acquisition was the target's proprietary AI technology.
|text=The primary driver for the acquisition was the target's proprietary AI technology.
}}
</pre>

== Compact Usage (New) ==
This puts the "more" link directly next to the text:
<pre>
{{show
|compact=yes
|text=This text is short and the button stays close.
}}
}}
</pre>
</pre>
Line 35: Line 44:
* '''collapsetext''': The text for the "hide" link (Defaults to "less ▴").
* '''collapsetext''': The text for the "hide" link (Defaults to "less ▴").
* '''inline''': Set to "yes" to use span tags (stays on the same line).
* '''inline''': Set to "yes" to use span tags (stays on the same line).
* '''compact''': Set to "yes" to keep the toggle link next to the text instead of right-aligned.
* '''state''': Set to "expanded" to have the text visible on page load.
* '''state''': Set to "expanded" to have the text visible on page load.
* '''style''': Pass additional CSS styles directly.
</noinclude>
</noinclude>

Revision as of 01:11, 20 December 2025

Usage

Standard block usage (floats toggle to the right):

{{show
|text=The primary driver for the acquisition was the target's proprietary AI technology.
}}

Compact Usage (New)

This puts the "more" link directly next to the text:

{{show
|compact=yes
|text=This text is short and the button stays close.
}}

Custom Labels

To change the "more" and "less" buttons:

{{show
|expandtext=Read Bio
|collapsetext=Close
|text=John Doe has been the CEO since 2010...
}}

Inline Usage

To use within a sentence:

The company reported a record revenue {{show|inline=yes|text=of $1.2B in Q4 2025.|expandtext=(more)}}

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 ▴").
  • inline: Set to "yes" to use span tags (stays on the same line).
  • compact: Set to "yes" to keep the toggle link next to the text instead of right-aligned.
  • state: Set to "expanded" to have the text visible on page load.
  • style: Pass additional CSS styles directly.