Template:Collapsible option: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Callanecc
Now automatically adds {{pp-template}} to protected templates as /doc does
meta>Frietjes
per request
Line 1: Line 1:
<!--
{{big|'''How to manage this template's visibility'''}}
  Automatically add {{pp-template}} to protected templates.
* 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.
-->{{template other
: 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.
| {{#ifeq: {{PROTECTIONLEVEL:move}} | sysop
: 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.
  | {{pp-template|docusage=yes}}
* {{#if:{{{state|}}}{{{default|}}}
  | {{#if: {{PROTECTIONLEVEL:edit}}
  | '''''{{#if:{{{state|}}} |{{{state}}} |{{{default}}} }}''' has been set as the default state.
    | {{pp-template|docusage=yes}}
  | Unless set otherwise (see ''state'' parameter within the template's code), autocollapse is the default state.
    | <!--Not protected, or only semi-move-protected-->
  }}<!--
    }}
  }}
}}
{{larger|'''How to manage this template's visibility'''}}
* Use <code>{&#123;<!--
  --><includeonly>{{BASEPAGENAME}}</includeonly><!--
  --><noinclude>''Template name''</noinclude> <!--
  -->|{{#ifeq:{{{statename|}}}|optional | |state=}}collapsed}}</code>&nbsp; <!--
  -->to show this template in its collapsed (hidden) state.
* Use <code>{&#123;<!--
  --><includeonly>{{BASEPAGENAME}}</includeonly><!--
  --><noinclude>''Template name''</noinclude> <!--
  -->|{{#ifeq:{{{statename|}}}|optional | |state=}}expanded}}</code>&nbsp; <!--
  -->to show this template in its expanded (fully visible) state.
* Use <code>{&#123;<!--
  --><includeonly>{{BASEPAGENAME}}</includeonly><!--
  --><noinclude>''Template name''</noinclude> <!--
  -->|{{#ifeq:{{{statename|}}}|optional | |state=}}autocollapse}}</code>&nbsp; <!--
  -->to show this template in its collapsed (hidden) state '''''only if''''' there is another template of the same type on the page.
*   {{#if:{{{state|{{{default|}}}}}}
    | '''{{{state|{{{default}}}}}}''' has been set as
    | Unless set otherwise (see ''state'' parameter within the template's code), autocollapse is
    }} the default state.<noinclude>


{{documentation}}
If template where this is transcluded is protected, add {{pp-template}}:
<!-- Add categories, interwiki links etc on the bottom of /doc page, not here -->
-->{{template other |{{#ifeq:{{PROTECTIONLEVEL:move}}|sysop |{{pp-template|docusage=yes}} |{{#if:{{PROTECTIONLEVEL:edit}}|{{pp-template|docusage=yes}}|}} }} }}<!--
 
--><noinclude>
{{Documentation}}
</noinclude>
</noinclude>

Revision as of 17:48, 14 May 2014

How to manage this template's visibility

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