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 it in its collapsed state, i.e. hidden apart from its titlebar.
|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>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}collapsed}}
|style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}collapsed}}


|- style="vertical-align:top;"
|- style="vertical-align:top;"
|style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}expanded
|style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}expanded
| ... to show it in its expanded state, i.e. fully visible.
| ... 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>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}expanded}}
|style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}expanded}}


|- style="vertical-align:top;"
|- style="vertical-align:top;"
|style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}autocollapse
|style="padding-left:2.8em;font-family:monospace;"| {{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}autocollapse
|style="line-height:1.35em;"| ... to show it 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="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>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}autocollapse}}
|style="font-family:monospace;"| {{braces |<includeonly>{{</includeonly>{{#if:{{{nobase|}}} | |BASE}}PAGENAME<includeonly>}}</includeonly>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state&#61;}}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}}