Template:Switchable: Difference between revisions

From Pikipedia, the Pikmin wiki
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="{{{t1}}}">
<div class="switch" title="{{{1}}}">
{{{c1}}}
{{{2}}}
</div>
</div>
<div class="switch" title="{{{t2}}}" style="display: none;">
<div class="switch" title="{{{3}}}" style="display: none;">
{{{c2}}}
{{{4}}}
</div>
</div>
{{#if:{{{c3|}}}|<div class="switch" title="{{{t3}}}" style="display: none;">
{{#if:{{{5|}}}|<div class="switch" title="{{{5}}}" style="display: none;">
{{{c3}}}
{{{6}}}
</div>}}{{#if:{{{c4|}}}|<div class="switch" title="{{{t4}}}" style="display: none;">
</div>}}{{#if:{{{7|}}}|<div class="switch" title="{{{7}}}" style="display: none;">
{{{c4}}}
{{{8}}}
</div>}}{{#if:{{{c5|}}}|<div class="switch" title="{{{t5}}}" style="display: none;">
</div>}}{{#if:{{{9|}}}|<div class="switch" title="{{{9}}}" style="display: none;">
{{{c5}}}
{{{10}}}
</div>}}
</div>}}
</div><noinclude>
</div><noinclude>
Line 22: Line 22:
! Parameter || Mandatory || Default || Purpose || Detailed description
! Parameter || Mandatory || Default || Purpose || Detailed description
|-
|-
! t1
! 1
| '''Yes''' ||  || Title 1 || Title of the first "box" of content.
| '''Yes''' ||  || Title 1 || Title of the first "box" of content.
|-
|-
! c1
! 2
| '''Yes''' ||  || Content 1 || Content of the first "box".
| '''Yes''' ||  || Content 1 || Content of the first "box".
|-
|-
! t2
! 3
| '''Yes''' ||  || Title 2 || Title of the second "box" of content.
| '''Yes''' ||  || Title 2 || Title of the second "box" of content.
|-
|-
! c2
! 4
| '''Yes''' ||  || Content 2 || Content of the second "box".
| '''Yes''' ||  || Content 2 || Content of the second "box".
|-
|-
! t3 - t5
! 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.
|-
|-
! c3 - c5
! 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 | t1= | c1= | t2= | c2= | t3= | c3= | t4= | c4= | t5= | c5= }}
{{switchable | | | | | | | | | | }}
</pre>
</pre>


Line 50: Line 50:
! Code || Result
! Code || Result
|-
|-
| <pre>{{switchable|t1=Red|c1=Red Pikmin|t2=Yellow|c2=Yellow Pikmin}}</pre>
| <pre>{{switchable|Red|Red Pikmin|Yellow|Yellow Pikmin}}</pre>
| {{switchable|t1=Red|c1=Red Pikmin|t2=Yellow|c2=Yellow Pikmin}}
| {{switchable|Red|Red Pikmin|Yellow|Yellow Pikmin}}
|-
|-
| <pre>{{switchable|t1=Red|c1=Red Onion|t2=Yellow|c2=Yellow Onion|t3=Blue|c3=Blue Onion}}</pre>
| <pre>{{switchable|Red|Red Onion|Yellow|Yellow Onion|Blue|Blue Onion}}</pre>
| {{switchable|t1=Red|c1=Red Onion|t2=Yellow|c2=Yellow Onion|t3=Blue|c3=Blue Onion}}
| {{switchable|Red|Red Onion|Yellow|Yellow Onion|Blue|Blue Onion}}
|}
|}


[[Category:Utility templates]]
[[Category:Utility templates]]
</noinclude>
</noinclude>

Revision as of 13: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