From World Afropedia
Jump to: navigation, search
m (1 revision)
 
*>Frietjes
(per request)
Line 1: Line 1:
'''Note to editors on how to manage collapsibility:'''
+
{{big|'''How to manage this template's visibility'''}}
*Use <tt>{&#123;<!--
+
* 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.
--><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=collapsed}}</tt> to show this template in its collapsed (hidden) 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 <tt>{&#123;<!--
+
: 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.
--><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=expanded}}</tt> to show this template in its expanded (fully visible) state.
+
* {{#if:{{{state|}}}{{{default|}}}
*Use <tt>{&#123;<!--
+
  | '''''{{#if:{{{state|}}} |{{{state}}} |{{{default}}} }}''' has been set as the default state.
--><includeonly>{{BASEPAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=autocollapse}}</tt> to show this template in its collapsed (hidden) state '''only if''' there is another template of the same type on the page. ({{{state|This}}} is usually the default.)<noinclude>
+
  | Unless set otherwise (see ''state'' parameter within the template's code), autocollapse is the default state.
{{documentation}}
+
  }}<!--
<!-- add categories, interwiki links etc on the bottom of /doc page, not here -->
+
 
 +
If template where this is transcluded is protected, add {{pp-template}}:
 +
-->{{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.
Template documentation[view] [edit] [history] [purge]

A standardised message for transclusion on template pages whose templates include a state parameter (through which their collapsibility may be managed).

It may be used on either the template page itself (wrapped with <noinclude></noinclude>), or on the template's {{documentation}} subpage.

See also

ar:قالب:خيار قابلية الطي da:Skabelon:Collapsible option id:Templat:Collapsible option ja:Template:Collapsible option ka:თარგი:Collapsible option tpi:Template:Collapsible option pt:Predefinição:Collapsible option vi:Tiêu bản:Tùy chọn đóng mở uk:Шаблон:Collapsible option zh:Template:Collapsible option