Template:Switchable: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Might as well have them unnamed.) |
||
Line 1: | Line 1: | ||
<div class="switchable"> | <div class="switchable"> | ||
<div class="switch" title="{{{ | <div class="switch" title="{{{1}}}"> | ||
{{{ | {{{2}}} | ||
</div> | </div> | ||
<div class="switch" title="{{{ | <div class="switch" title="{{{3}}}" style="display: none;"> | ||
{{{ | {{{4}}} | ||
</div> | </div> | ||
{{#if:{{{ | {{#if:{{{5|}}}|<div class="switch" title="{{{5}}}" style="display: none;"> | ||
{{{ | {{{6}}} | ||
</div>}}{{#if:{{{ | </div>}}{{#if:{{{7|}}}|<div class="switch" title="{{{7}}}" style="display: none;"> | ||
{{{ | {{{8}}} | ||
</div>}}{{#if:{{{ | </div>}}{{#if:{{{9|}}}|<div class="switch" title="{{{9}}}" style="display: none;"> | ||
{{{ | {{{10}}} | ||
</div>}} | </div>}} | ||
</div><noinclude> | </div><noinclude> | ||
Line 22: | Line 22: | ||
! Parameter || Mandatory || Default || Purpose || Detailed description | ! Parameter || Mandatory || Default || Purpose || Detailed description | ||
|- | |- | ||
! | ! 1 | ||
| '''Yes''' || || Title 1 || Title of the first "box" of content. | | '''Yes''' || || Title 1 || Title of the first "box" of content. | ||
|- | |- | ||
! | ! 2 | ||
| '''Yes''' || || Content 1 || Content of the first "box". | | '''Yes''' || || Content 1 || Content of the first "box". | ||
|- | |- | ||
! | ! 3 | ||
| '''Yes''' || || Title 2 || Title of the second "box" of content. | | '''Yes''' || || Title 2 || Title of the second "box" of content. | ||
|- | |- | ||
! | ! 4 | ||
| '''Yes''' || || Content 2 || Content of the second "box". | | '''Yes''' || || Content 2 || Content of the second "box". | ||
|- | |- | ||
! | ! 5, 7, 9 | ||
| No || || Title 3 to 5 || Title of the third to fifth "boxes" of content. | | No || || Title 3 to 5 || Title of the third to fifth "boxes" of content. | ||
|- | |- | ||
! | ! 6, 8, 10 | ||
| No || || Content 3 to 5 || Content of the third to fifth "boxes". | | No || || Content 3 to 5 || Content of the third to fifth "boxes". | ||
|} | |} | ||
Line 43: | Line 43: | ||
==Skeleton== | ==Skeleton== | ||
<pre> | <pre> | ||
{{switchable | | {{switchable | | | | | | | | | | }} | ||
</pre> | </pre> | ||
Line 50: | Line 50: | ||
! Code || Result | ! Code || Result | ||
|- | |- | ||
| <pre>{{switchable| | | <pre>{{switchable|Red|Red Pikmin|Yellow|Yellow Pikmin}}</pre> | ||
| {{switchable| | | {{switchable|Red|Red Pikmin|Yellow|Yellow Pikmin}} | ||
|- | |- | ||
| <pre>{{switchable| | | <pre>{{switchable|Red|Red Onion|Yellow|Yellow Onion|Blue|Blue Onion}}</pre> | ||
| {{switchable| | | {{switchable|Red|Red Onion|Yellow|Yellow Onion|Blue|Blue Onion}} | ||
|} | |} | ||
[[Category:Utility templates]] | [[Category:Utility templates]] | ||
</noinclude> | </noinclude> |
Revision as of 12:21, January 30, 2015
{{{2}}}
Info
This template makes it easy to have content that can be switched by user-clicked buttons. Only the first "box" is shown, and all others are hidden, until they are clicked on.
Parameters
Parameter | Mandatory | Default | Purpose | Detailed description |
---|---|---|---|---|
1 | Yes | Title 1 | Title of the first "box" of content. | |
2 | Yes | Content 1 | Content of the first "box". | |
3 | Yes | Title 2 | Title of the second "box" of content. | |
4 | Yes | Content 2 | Content of the second "box". | |
5, 7, 9 | No | Title 3 to 5 | Title of the third to fifth "boxes" of content. | |
6, 8, 10 | No | Content 3 to 5 | Content of the third to fifth "boxes". |
Skeleton
{{switchable | | | | | | | | | | }}
Examples
Code | Result |
---|---|
{{switchable|Red|Red Pikmin|Yellow|Yellow Pikmin}} |
Red Pikmin |
{{switchable|Red|Red Onion|Yellow|Yellow Onion|Blue|Blue Onion}} |
Red Onion |