The editors' meeting has been canceled for technical reasons.

Template:HideInline: Difference between revisions

From NeuroWiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="HideInline">{{#if:{{{标题|{{{標題|}}}}}}|{{{标题|{{{標題|}}}}}}|{{#ifeq:{{{1}}}|show|{{{2|}}}|{{{1|}}}}}}}<span class="mw-collapsible {{#ifeq:{{#switch:show|{{{show|}}}|{{{1|}}}=true|#default=false}}|true||mw-collapsed}}" {{#if:{{{expandtext|}}}|data-expandtext="{{{expandtext}}}"|}} {{#if:{{{collapsetext|}}}|data-collapsetext="{{{collapsetext}}}"|}}>{{#if:{{{内容|{{{內容|}}}}}}|{{{内容|{{{內容|}}}}}}|{{#ifeq:{{{1}}}|show|{{{3|}}}|{{{2|}}}}}}}</span></span>{{#if:{{#varexists:HideInlineInvoked}}||{{tsl|Template:HideInline/styles.css}}{{#vardefine:HideInlineInvoked|Invoked}}}}</includeonly><noinclude>{{Documentation}}[[分类:功能模板]]</noinclude>
<includeonly><span class="HideInline">{{#if:{{{Title|{{{TITLE|}}}}}}|{{{Title|{{{TITLE|}}}}}}|{{#ifeq:{{{1}}}|show|{{{2|}}}|{{{1|}}}}}}}<span class="mw-collapsible {{#ifeq:{{#switch:show|{{{show|}}}|{{{1|}}}=true|#default=false}}|true||mw-collapsed}}" {{#if:{{{expandtext|}}}|data-expandtext="{{{expandtext}}}"|}} {{#if:{{{collapsetext|}}}|data-collapsetext="{{{collapsetext}}}"|}}>{{#if:{{{Content|{{{CONTENT|}}}}}}|{{{Content|{{{CONTENT|}}}}}}|{{#ifeq:{{{1}}}|show|{{{3|}}}|{{{2|}}}}}}}</span></span>{{#if:{{#varexists:HideInlineInvoked}}||{{tsl|Template:HideInline/styles.css}}{{#vardefine:HideInlineInvoked|Invoked}}}}</includeonly><noinclude>{{Documentation}}[[zh:Template:HideInline]][[Category:Functional_Templates]]</noinclude>

Latest revision as of 23:44, 12 January 2025

[ View | Edit | History | Purge ]Documentation page

This template uses template styles Template:HideInline/styles.css, this stylesheet(s) are written in CSS.
For more details, please see Help:TemplateStyles and Extension:TemplateStyles.

All parameters of {{hide}} are valid except for the `width` parameter.

This is a placeholderTest

Parameters

This template provides the following parameters:

  1. show
  2. title (or defaults to the first unnamed parameter)
  3. content (or defaults to the second unnamed parameter)
  4. expandtext
  5. collapsetext

show

The `show` parameter is a special parameter. It can and must only be used as the first parameter.
When used, it automatically expands the hidden content.
{{HideInline|show|Title|Content}}
or
{{HideInline|show|title=Title|content=Content}}
will output:

TitleContent

Title

{{HideInline|title=Title Test}}
and
{{HideInline|Title Test}}
will output the same result:

Title Test

Content

{{HideInline|title=Title|content=Content Test}}
and
{{HideInline|Title|Content Test}}
will output the same result:

TitleContent Test

expandtext

{{HideInline|Title|Content|expandtext=Expand Text Test}}
will output:

TitleContent
You can see that the text of the expand button has been changed.

collapsetext

{{HideInline|Title|Content|collapsetext=Collapse Text Test}}
will output:

TitleContent
You can see that the text of the collapse button has been changed.

[ View | Edit | History | Purge ]The above documentation is transcluded from Template:HideInline/doc.