Template:Collapsible option: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Sardanaphalus
m +gap before documentation begins
meta>Malyctenar
simplify pointlessly tangled code, return stating the default as well as allowing to change it - this is used on templates whose default state IS different
Line 1: Line 1:
Use <span style="font-size:95%;"><code><nowiki>{{</nowiki><!--
Use <code style="font-size:95%">{&#123;<!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=collapsed}}</code></span> to show this template in its collapsed (hidden) state.<br/><!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=collapsed}}</code> to show this template in its collapsed (hidden) state.<br/><!--


-->Use <span style="font-size:95%;"><code><nowiki>{{</nowiki><!--
-->Use <code style="font-size:95%">{&#123;<!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=expanded}}</code></span> to show this template in its expanded (fully visible) state.<br/><!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=expanded}}</code> to show this template in its expanded (fully visible) state.<br/><!--


-->Use <span style="font-size:95%;"><code><nowiki>{{</nowiki><!--
-->Use <code style="font-size:95%">{&#123;<!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=autocollapse}}</code></span> to show this template in its collapsed (hidden) state only if there is another template of the same type on the page. <!--Disabling as not generally used: ({{{state|{{{default|This}}}}}} is the default.)--><!--Possible more general alternative: The default state for this template may not be as the template appears above. To find it, edit the page and look for a "state&nbsp;=" statement, usually near the beginning.--><!--
--><includeonly>{{PAGENAME}}</includeonly><noinclude>''Template name''</noinclude>|state=autocollapse}}</code> 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 the default.)<noinclude>


--><noinclude>
{{documentation}}
<br/>{{documentation}}


<!---Please add metadata to the <includeonly> section at the bottom of the /doc subpage--->
<!-- add categories, interwiki links etc on the bottom of /doc page, not here -->
</noinclude>
</noinclude>

Revision as of 09:12, 6 May 2008

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. (This is the default.)