Open main menu

Changes

add undocumented parameters, update See also
{{Documentation subpage}}
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata -->

== Usage ==
This template will allow you to collapse a section of a page. The first parameter is the title of the collapse section, and the second (optional parameter) is the width. To close the section, use '''<code><nowiki>{{divhide|end}}</nowiki></code>'''.

=== 1st parameter ===
The first unnamed parameter is used at the top for the title and at the bottom to mark the end of the hidden section.
<pre>
{{divhide|Test}}
These are the hidden contents.
{{divhide|end}}
</pre>

{{divhide|Test}}
These are the hidden contents.
{{divhide|end}}

=== 2nd parameter ===
The second unnamed parameter is used to specify the width.

<pre>
{{divhide|Half test|50%}}
These are the hidden contents, and the box only takes up 50% of the page.
{{divhide|end}}
</pre>

{{divhide|Half test|50%}}
These are the hidden contents, and the box only takes up 50% of the page.
{{divhide|end}}

=== width parameter ===
The <code>width</code> parameter may be used to specify the width.

<pre>
{{divhide|Width test|width=75%}}
These are the hidden contents, and the box only takes up 75% of the page.
{{divhide|end}}
</pre>

{{divhide|Width test|width=75%}}
These are the hidden contents, and the box only takes up 75% of the page.
{{divhide|end}}

=== show parameter ===
The parameter {{para|show|yes}} may be used to show the contents by default.

<pre>
{{divhide|Show test|show=yes}}
This section is shown by default.
{{divhide|end}}
</pre>

{{divhide|Show test|show=yes}}
This section is shown by default.
{{divhide|end}}

=== color parameter ===
The <code>color</code> parameter may be used to specify the background color.

<pre>
{{divhide|Color test|color=#90EE90}}
The header of this section has different background color.
{{divhide|end}}
</pre>

{{divhide|Color test|color=#90EE90}}
The header of this section has different background color.
{{divhide|end}}

== Note on using this template to close discussions ==
This template should typically not be used to close discussions as {{tl|hat}} is available for this purpose; but if it is, it '''should only be used by uninvolved editors or administrators''' in conjunction with the [[Wikipedia:talk page guidelines|talk page guidelines]] and relevant advice at [[wp:refactoring|refactoring]]. It should not be used by involved parties to end a discussion over the objections of other editors.

== See also ==
* {{tl|Divbox}} - allows you to create coloured text background
* {{tl|Collapse}}, {{tl|Collapse top}} and {{tl|Collapse bottom}}
* {{tl|Hidden}}, {{tl|Hidden begin}} and {{tl|Hidden end}}
* {{tl|Show}}

<includeonly>{{sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Collapse templates]]
}}</includeonly>
Anonymous user