Template:Collapsible option
Initial visibility
To set the template's initial visibility, the |{{#if:state|state=}}
parameter may be used:
|{{#if:state|state=}}collapsed
: {{{{#if:| |BASE}}PAGENAME|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar|{{#if:state|state=}}expanded
: {{{{#if: | |BASE}}PAGENAME|state=expanded}} to show the template expanded, i.e., fully visible|{{#if:state|state=}}autocollapse
: {{{{#if: | |BASE}}PAGENAME|state=autocollapse}}- shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
- shows the template in its expanded state if there are no other collapsible items on the page
If the |{{#if:state|state=}}
parameter is not set, the template's initial visibility is taken from the |{{#if:default|default=}}
parameter in the template. For this template, that currently evaluates to {{#switch:|collapsed=collapsed|expanded=expanded|autocollapse|#default=autocollapse}}
.{{#if:|
|{{#if:align|align=}}value
is also available; where value can be eitherright
orleft
. The default iscenter
}}{{#if:|:|{{#if:title-background|title-background=}}value
is also available; where value can be either navbox
or a color
. The default is none
and navbox
defaults to the default navbox color.
}}{{#if:|
|{{#if:width|width=}}value
is also available; where value can be eitherN [em/%/px]
orauto
. The default is100%
}}{{#switch:
{{#if: | {{{demospace}}} | {{#ifeq:Template|Template | template | other }} }}
| template = {{#if: |Lua error in Module:Effective_protection_level at line 52: attempt to index field 'ext' (a nil value).
| {{#if: |Lua error in Module:Effective_protection_level at line 41: attempt to index field 'ext' (a nil value). }}
}}
| other | #default = }}
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |
{{#if:|
[[Category:Template documentation pages{{#translation:}}]] }}