Template:Collapsible option: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>Sardanaphalus m →top: corrected inline template's scope |
meta>Sardanaphalus m "the template" |
||
Line 7: | Line 7: | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|style="padding-left:2.8em;font-family:monospace;padding-right:2.5em;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}collapsed | |style="padding-left:2.8em;font-family:monospace;padding-right:2.5em;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}collapsed | ||
|style="padding-right:1.5em;"| ... to show | |style="padding-right:1.5em;"| ... to show the template in its collapsed state, i.e. hidden apart from its titlebar. | ||
|style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly> {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}collapsed}} | |style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly> {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}collapsed}} | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}expanded | |style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}expanded | ||
| ... to show | | ... to show the template in its expanded state, i.e. fully visible. | ||
|style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly> {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}expanded}} | |style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly> {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}expanded}} | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
|style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}autocollapse | |style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}autocollapse | ||
|style="line-height:1.35em;"| ... to show | |style="line-height:1.35em;"| ... to show the template in its collapsed state ''but only if'' there is another<br/><span style="visibility:hidden;">... </span>template of the same type on the page. | ||
|style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly> {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}autocollapse}} | |style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly> {{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}autocollapse}} | ||
|} | |} |
Revision as of 15:29, 26 October 2014
How to manage this template's initial visibility
|
Example | |
|state=collapsed | ... to show the template in its collapsed state, i.e. hidden apart from its titlebar. | {{BASEPAGENAME |state=collapsed}} |
|state=expanded | ... to show the template in its expanded state, i.e. fully visible. | {{BASEPAGENAME |state=expanded}} |
|state=autocollapse | ... to show the template in its collapsed state but only if there is another template of the same type on the page. |
{{BASEPAGENAME |state=autocollapse}} |
- Unless set otherwise (see theTemplate:Plaincodeparameter in the template's code), the template's default state is autocollapse.Template:When on template page