Template:Collapsible option: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Frietjes
per request
meta>Sardanaphalus
Update from sandbox ({{tlc}}, removed thinsps)
Line 1: Line 1:
{{big|'''How to manage this template's visibility'''}}
{{big|'''How to manage this template's visibility'''}}
* Use &thinsp;<code>{{((}}<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>''Template name''</noinclude>&nbsp;&#124;{{#ifeq:{{{statename|}}}|optional | |state=}}collapsed}}</code>&thinsp; to show this template in its collapsed (hidden) state.
* Use {{tlc |<includeonly>{{</includeonly>BASEPAGENAME<includeonly>}}</includeonly>&nbsp; |{{#ifeq:{{{statename|}}}|optional | |state=}}collapsed}} to show this template in its collapsed (i.e. hidden<!--or: titlebar-only-->) state.
: Use &thinsp;<code>{{((}}<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>''Template name''</noinclude>&nbsp;&#124;{{#ifeq:{{{statename|}}}|optional | |state=}}expanded}}</code>&thinsp; to show this template in its expanded (fully visible) state.
: Use {{tlc |<includeonly>{{</includeonly>BASEPAGENAME<includeonly>}}</includeonly>&nbsp; |{{#ifeq:{{{statename|}}}|optional | |state=}}expanded}} to show this template in its expanded (i.e. fully visible) state.
: Use &thinsp;<code>{{((}}<includeonly>{{BASEPAGENAME}}</includeonly><noinclude>''Template name''</noinclude>&nbsp;&#124;{{#ifeq:{{{statename|}}}|optional | |state=}}autocollapse}}</code>&thinsp; to show this template in its collapsed (hidden) state '''''only if''''' there is another template of the same type on the page.
: Use {{tlc |<includeonly>{{</includeonly>BASEPAGENAME<includeonly>}}</includeonly>&nbsp; |{{#ifeq:{{{statename|}}}|optional | |state=}}autocollapse}} to show this template in its collapsed state '''''only if''''' there is another template of the same type on the page.
* {{#if:{{{state|}}}{{{default|}}}
* {{#if:{{{state|}}}{{{default|}}}
   | '''''{{#if:{{{state|}}} |{{{state}}} |{{{default}}} }}''' has been set as the default state.
   | '''''{{#if:{{{state|}}} |{{{state}}} |{{{default}}} }}''' has been set as the default state.
   | Unless set otherwise (see ''state'' parameter within the template's code), autocollapse is the default state.
   | Unless set otherwise (see the ''state'' parameter within the template's code), the template's default state is "autocollapse".
   }}<!--
   }}<!--


If template where this is transcluded is protected, add {{pp-template}}:
----Add {{pp-template}} if template where this is transcluded is protected:----
-->{{template other |{{#ifeq:{{PROTECTIONLEVEL:move}}|sysop |{{pp-template|docusage=yes}} |{{#if:{{PROTECTIONLEVEL:edit}}|{{pp-template|docusage=yes}}|}} }} }}<!--
--->{{Template other
 
    | {{#ifeq:{{PROTECTIONLEVEL:move}}|sysop |{{pp-template|docusage=yes}}
--><noinclude>
        | {{#if:{{PROTECTIONLEVEL:edit}}     |{{pp-template|docusage=yes}} }}
    }} }}<noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Revision as of 11:09, 11 August 2014

How to manage this template's visibility

  • Use {{BASEPAGENAME |state=collapsed}} to show this template in its collapsed (i.e. hidden) state.
Use {{BASEPAGENAME |state=expanded}} to show this template in its expanded (i.e. fully visible) state.
Use {{BASEPAGENAME |state=autocollapse}} to show this template in its collapsed state only if there is another template of the same type on the page.
  • Unless set otherwise (see the state parameter within the template's code), the template's default state is "autocollapse".