Difference between revisions of "Template:Collapsible option/testcases"

From blackwiki
Jump to navigation Jump to search
Line 7: Line 7:
  
 
== Default ==
 
== Default ==
:<code><nowiki>{{Collapsible option/sandbox}}</nowiki></code> produces:
+
<code><nowiki>{{Collapsible option/sandbox}}</nowiki></code> produces:
 
{{Collapsible option/sandbox}}
 
{{Collapsible option/sandbox}}
  
 
== with {{!}}title=[nothing] ==
 
== with {{!}}title=[nothing] ==
:<code><nowiki>{{Collapsible option/sandbox|title=}}</nowiki></code> produces:
+
<code><nowiki>{{Collapsible option/sandbox|title=}}</nowiki></code> produces:
 
{{Collapsible option/sandbox|title=}}
 
{{Collapsible option/sandbox|title=}}
  
 
== with {{!}}title=My Title==
 
== with {{!}}title=My Title==
:<code><nowiki>{{Collapsible option/sandbox|title=My Title}}</nowiki></code> produces:
+
<code><nowiki>{{Collapsible option/sandbox|title=My Title}}</nowiki></code> produces:
 
{{Collapsible option/sandbox|title=My Title}}
 
{{Collapsible option/sandbox|title=My Title}}
  
 
== with {{!}}title=... ==
 
== with {{!}}title=... ==
:<code><nowiki>{{Collapsible option/sandbox|title=;Parameter option {{para|state}}}}</nowiki></code> produces:
+
<code><nowiki>{{Collapsible option/sandbox|title=;Parameter option {{para|state}}}}</nowiki></code> produces:
 
{{Collapsible option/sandbox|title=;Parameter option {{para|state}}}}
 
{{Collapsible option/sandbox|title=;Parameter option {{para|state}}}}
  
Line 25: Line 25:
 
:Setting {{para|title|}} to suppress
 
:Setting {{para|title|}} to suppress
 
:the section title (=== ===) is added in the page (not by the template)
 
:the section title (=== ===) is added in the page (not by the template)
:<code><nowiki>{{Collapsible option/sandbox|title=}}</nowiki></code>
+
<code><nowiki>{{Collapsible option/sandbox|title=}}</nowiki></code>
 
===Section header about state===
 
===Section header about state===
 
{{Collapsible option/sandbox|title=}}
 
{{Collapsible option/sandbox|title=}}
  
 
== with {{!}}align and/or {{!}}width ==
 
== with {{!}}align and/or {{!}}width ==
:<code><nowiki>{{Collapsible option/sandbox|align=on}}</nowiki></code> produces:
+
<code><nowiki>{{Collapsible option/sandbox|align=on}}</nowiki></code> produces:
 
{{Collapsible option/sandbox|align=on}}
 
{{Collapsible option/sandbox|align=on}}
 
+
<br/><br/><code><nowiki>{{Collapsible option/sandbox|width=on}}</nowiki></code> produces:
:<code><nowiki>{{Collapsible option/sandbox|width=on}}</nowiki></code> produces:
 
 
{{Collapsible option/sandbox|width=on}}
 
{{Collapsible option/sandbox|width=on}}
 
+
<br/><br/><code><nowiki>{{Collapsible option/sandbox|align=on|width=on}}</nowiki></code> produces:
:<code><nowiki>{{Collapsible option/sandbox|align=on|width=on}}</nowiki></code> produces:
 
 
{{Collapsible option/sandbox|align=on|width=on}}
 
{{Collapsible option/sandbox|align=on|width=on}}
  
 
== Current live version ==
 
== Current live version ==
:<code><nowiki>{{Collapsible option}}</nowiki></code> produces:
+
<code><nowiki>{{Collapsible option}}</nowiki></code> produces:
 
{{Collapsible option}}
 
{{Collapsible option}}

Revision as of 09:38, 20 April 2015

Note: Section headers here are not part of the sandbox code; bold text is.

Script error: No such module "Purge".

Default

{{Collapsible option/sandbox}} produces: Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

with |title=[nothing]

{{Collapsible option/sandbox|title=}} produces: Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

with |title=My Title

{{Collapsible option/sandbox|title=My Title}} produces: Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

with |title=...

{{Collapsible option/sandbox|title=;Parameter option {{para|state}}}} produces: Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

Set outside section

Setting |title= to suppress
the section title (=== ===) is added in the page (not by the template)

{{Collapsible option/sandbox|title=}}

Section header about state

Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

with |align and/or |width

{{Collapsible option/sandbox|align=on}} produces: Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

|align=value is also available; where value can be either right or left. The default is center



{{Collapsible option/sandbox|width=on}} produces: Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

|width=value is also available; where value can be either N [em/%/px] or auto. The default is 100%



{{Collapsible option/sandbox|align=on|width=on}} produces: Initial visibility: currently defaults to autocollapse

To set the template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter is not set, the template's initial visibility is taken from the |default= parameter in this Collapsible option template. For the template on this page, that currently evaluates to autocollapse.

|align=value is also available; where value can be either right or left. The default is center
|width=value is also available; where value can be either N [em/%/px] or auto. The default is 100%

Current live version

{{Collapsible option}} produces: Initial visibility: currently defaults to autocollapse

To set this template's initial visibility, the |state= parameter may be used:

  • |state=collapsed: {{Collapsible option|state=collapsed}} to show the template collapsed, i.e., hidden apart from its title bar
  • |state=expanded: {{Collapsible option|state=expanded}} to show the template expanded, i.e., fully visible
  • |state=autocollapse: {{Collapsible option|state=autocollapse}}
    • shows the template collapsed to the title bar if there is a {{navbar}}, a {{sidebar}}, or some other table on the page with the collapsible attribute
    • shows the template in its expanded state if there are no other collapsible items on the page

If the |state= parameter in the template on this page is not set, the template's initial visibility is taken from the |default= parameter in the Collapsible option template. For the template on this page, that currently evaluates to autocollapse.