Difference between revisions of "Template:Collapsible option/testcases"
imported>DePiep (reformat demo code - testcases unchenged) |
imported>DePiep (Collapsible option/sandbox2 into Collapsible option/sandbox -- use standard) |
||
Line 2: | Line 2: | ||
{{Testcases notice |toc=on}} | {{Testcases notice |toc=on}} | ||
__TOC__ | __TOC__ | ||
− | * [[Template:Collapsible option/ | + | * [[Template:Collapsible option/sandbox]] (that's #2) |
Note: Section headers here are ''not'' part of the sandbox code; bold text is. | Note: Section headers here are ''not'' part of the sandbox code; bold text is. | ||
:{{purge}} | :{{purge}} | ||
==Default== | ==Default== | ||
− | :<code><nowiki>{{Collapsible option/ | + | :<code><nowiki>{{Collapsible option/sandbox}}</nowiki></code> → |
− | {{Collapsible option/ | + | {{Collapsible option/sandbox}} |
==Set title=(blank) == | ==Set title=(blank) == | ||
− | :<code><nowiki>{{Collapsible option/ | + | :<code><nowiki>{{Collapsible option/sandbox|title=}}</nowiki></code> → |
− | {{Collapsible option/ | + | {{Collapsible option/sandbox|title=}} |
==Set title=My Title== | ==Set title=My Title== | ||
− | :<code><nowiki>{{Collapsible option/ | + | :<code><nowiki>{{Collapsible option/sandbox|title=My Title}}</nowiki></code> → |
− | {{Collapsible option/ | + | {{Collapsible option/sandbox|title=My Title}} |
==Set title=... == | ==Set title=... == | ||
− | :<code><nowiki>{{Collapsible option/ | + | :<code><nowiki>{{Collapsible option/sandbox|title=;Parameter option {{para|state}}}}</nowiki></code> → |
− | {{Collapsible option/ | + | {{Collapsible option/sandbox|title=;Parameter option {{para|state}}}} |
==Set outside section== | ==Set outside section== | ||
: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/ | + | :<code><nowiki>{{Collapsible option/sandbox|title=}}</nowiki></code> |
===Section header about state=== | ===Section header about state=== | ||
− | {{Collapsible option/ | + | {{Collapsible option/sandbox|title=}} |
==Current live version== | ==Current live version== | ||
:<code><nowiki>{{Collapsible option}}</nowiki></code> → | :<code><nowiki>{{Collapsible option}}</nowiki></code> → | ||
{{Collapsible option}} | {{Collapsible option}} |
Revision as of 12:19, 17 January 2015
- Test anchor from here: Template:Collapsible option/testcases#Collapsed state.
![]() | This is the template test cases page for the sandbox of Template:Collapsible option. Script error: No such module "Purge". to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki, see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins with these links: |
Contents
- Template:Collapsible option/sandbox (that's #2)
Note: Section headers here are not part of the sandbox code; bold text is.
- Script error: No such module "Purge".
Default
{{Collapsible option/sandbox}}
→
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 title=(blank)
{{Collapsible option/sandbox|title=}}
→
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 title=My Title
{{Collapsible option/sandbox|title=My Title}}
→
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 title=...
{{Collapsible option/sandbox|title=;Parameter option {{para|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
.
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
.
Current live version
{{Collapsible option}}
→
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}}
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
.