Template:Collapsible option

From Mirrorplay: Fae
Revision as of 09:25, 16 June 2024 by Storyteller (talk | contribs) (1 revision imported: Supplementary Module/Template UL)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This template's initial visibility currently defaults to {{#switch:|collapsed=collapsed|expanded=expanded|autocollapse|#default=autocollapse}}, meaning that {{#switch:|collapsed=it is hidden apart from its title bar.|expanded=it is fully visible.|autocollapse|#default=if there is another collapsible item on the page (a navbox, sidebar, or table with the collapsible attribute), it is hidden apart from its title bar; if not, it is fully visible.}}

To change this template's initial visibility, the |{{SAFESUBST:#if:state|state=}} parameter may be used:

    {{#ifeq:|collapsed||
  • <syntaxhighlight lang="wikitext" inline="1">{{{{#if:| |BASE}}PAGENAME|state=collapsed}}</syntaxhighlight> will show the template collapsed, i.e. hidden apart from its title bar.
  • }} {{#ifeq:|expanded||
  • <syntaxhighlight lang="wikitext" inline="1">{{{{#if: | |BASE}}PAGENAME|state=expanded}}</syntaxhighlight> will show the template expanded, i.e. fully visible.
  • }} {{#ifeq:autocollapse|autocollapse||
  • <syntaxhighlight lang="wikitext" inline="1">{{{{#if: | |BASE}}PAGENAME|state=autocollapse}}</syntaxhighlight> will show the template autocollapsed, i.e. if there is another collapsible item on the page (a navbox, sidebar, or table with the collapsible attribute), it is hidden apart from its title bar, but if not, it is fully visible.
  • }}

{{#if:||{{SAFESUBST:#if:align|align=}}value is also available; where value can be either right or left. The default is center.

}}{{#if:||{{SAFESUBST:#if:title-background|title-background=}}value is also available; where value can be either navbox or a color. The default is none, and navbox defaults to the default navbox color. }}{{#if:| |{{SAFESUBST:#if:width|width=}}value is also available; where value can be either N [em/%/px] or auto. The default is 100%. }}{{#switch:

 {{#if:
 | {{{demospace}}}    
 | {{#ifeq:Template|Template
   | template
   | other
   }}
 }}

| template = {{#if: |Template:Pp-template

      | {{#if: |Template:Pp-move }}
  }} 

| other | #default = }}