Template:Collapsible option: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Redrose64
{{pp-template}} puts page in Category:Wikipedia pages with incorrect protection templates if page is only move-protected
meta>Sardanaphalus
Update from sandbox (#titleparts, tcpl)
Line 1: Line 1:
{{big|'''How to manage this template's visibility'''}}
{{big|'''How to manage this template's visibility'''}}
* Use {{plaincode|{{((}}<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 {{tcpl|<includeonly>{{#titleparts:{{</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 {{plaincode|{{((}}<includeonly>{{</includeonly>BASEPAGENAME<includeonly>}}</includeonly>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}expanded{{))}}}} to show this template in its expanded (i.e. fully visible) state.
: Use {{tcpl|<includeonly>{{#titleparts:{{</includeonly>BASEPAGENAME<includeonly>}}}}</includeonly>&nbsp;{{!}}{{#ifeq:{{{statename|}}}|optional | |state=}}expanded}} to show this template in its expanded (i.e. fully visible) state.
: Use {{plaincode|{{((}}<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.
: Use {{tcpl|<includeonly>{{#titleparts:{{</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.
Line 8: Line 8:
   }}<!--
   }}<!--


----Add {{pp-template}} if template where this is transcluded is protected:----
Add {{pp-template}} if template where this template is transcluded is protected:
--->{{Template other
-->{{Template other <!--(i.e. "If on template page, then:")-->
    | {{#if:{{PROTECTIONLEVEL:edit}} |{{pp-template|docusage=yes}}
    | {{#if:{{PROTECTIONLEVEL:edit}} |{{pp-template|docusage=yes}}
        | {{#if:{{PROTECTIONLEVEL:move}}     |{{pp-move|docusage=yes|small=yes}} }}
      | {{#if:{{PROTECTIONLEVEL:move}} |{{pp-move|docusage=yes|small=yes}} }}
    }} }}<noinclude>
  }} }}<noinclude>
{{Documentation}}
{{Documentation}}
</noinclude>
</noinclude>

Revision as of 19:45, 12 October 2014

How to manage this template's visibility

  • Use Template:Tcpl to show this template in its collapsed (i.e. hidden) state.
Use Template:Tcpl to show this template in its expanded (i.e. fully visible) state.
Use Template:Tcpl 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".