Template:HideInline/doc: Difference between revisions
m 1 revision imported |
m Text replacement - " {{lc:" to "{{lc:" |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Uses TemplateStyles}} | {{Uses TemplateStyles}} | ||
All parameters of {{tl|hide}} are valid except for the `width` parameter. | |||
{{HideInline| | {{HideInline|This is a placeholder|Test|expandtext=Do you really want to see?|collapsetext=Actually, there's nothing here}} | ||
== | == Parameters == | ||
This template provides the following parameters: | |||
#show | # show | ||
# | # title (or defaults to the first unnamed parameter) | ||
# | # content (or defaults to the second unnamed parameter) | ||
#expandtext | # expandtext | ||
#collapsetext | # collapsetext | ||
=== show === | |||
The `show` parameter is a special parameter. It can and must only be used as the first parameter.<br> | |||
When used, it automatically expands the hidden content.<br> | |||
<code><nowiki>{{HideInline|show|Title|Content}}</nowiki></code><br> | |||
or<br> | |||
<code><nowiki>{{HideInline|show|title=Title|content=Content}}</nowiki></code><br> | |||
will output:<br><br> | |||
{{HideInline|show|Title|Content}} | |||
=== | === Title === | ||
<code><nowiki>{{HideInline|title=Title Test}}</nowiki></code><br/> | |||
and<br/> | |||
<code><nowiki>{{HideInline| | <code><nowiki>{{HideInline|Title Test}}</nowiki></code><br/> | ||
will output the same result:<br/><br/> | |||
<code><nowiki>{{HideInline| | {{HideInline|Title Test}} | ||
{{HideInline| | |||
=== | === Content === | ||
<code><nowiki>{{HideInline| | <code><nowiki>{{HideInline|title=Title|content=Content Test}}</nowiki></code><br/> | ||
and<br/> | |||
<code><nowiki>{{HideInline| | <code><nowiki>{{HideInline|Title|Content Test}}</nowiki></code><br/> | ||
will output the same result:<br/><br/> | |||
{{HideInline| | {{HideInline|Title|Content Test}} | ||
=== | === expandtext === | ||
<code><nowiki>{{HideInline| | <code><nowiki>{{HideInline|Title|Content|expandtext=Expand Text Test}}</nowiki></code><br/> | ||
will output:<br/><br/> | |||
< | {{HideInline|Title|Content|expandtext=Expand Text Test}}<br> | ||
You can see that the text of the expand button has been changed. | |||
=== collapsetext === | |||
<code><nowiki>{{HideInline|Title|Content|collapsetext=Collapse Text Test}}</nowiki></code><br/> | |||
will output:<br/><br/> | |||
{{HideInline|Title|Content|collapsetext=Collapse Text Test}}<br> | |||
You can see that the text of the collapse button has been changed. <noinclude>[[zh:Template:HideInline/doc]][[Category:T{{lc:emplate documentation}}]]</noinclude> | |||
===collapsetext=== | |||
<code><nowiki>{{HideInline| | |||
{{HideInline| | |||
Latest revision as of 22:50, 12 April 2025
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:
- show
- title (or defaults to the first unnamed parameter)
- content (or defaults to the second unnamed parameter)
- expandtext
- 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.