Template:Switcher: Difference between revisions
From the Croc Wiki, the Croc encyclopedia
Jump to navigationJump to search
Content deleted Content added
trim to prevent span tags wrapping to new line (Linter error) |
Make substable |
||
Line 1: | Line 1: | ||
<div class="switcher-container"><!-- |
<div class="switcher-container"><noinclude><!-- |
||
-->{{#if:{{{2|}}}|<div>{{{1|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|1|data-switcher-default=""}}>{{trim|{{{2|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{2|}}}|<div>{{{1|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|1|data-switcher-default=""}}>{{trim|{{{2|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{4|}}}|<div>{{{3|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|2|data-switcher-default=""}}>{{trim|{{{4|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{4|}}}|<div>{{{3|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|2|data-switcher-default=""}}>{{trim|{{{4|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{6|}}}|<div>{{{5|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|3|data-switcher-default=""}}>{{trim|{{{6|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{6|}}}|<div>{{{5|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|3|data-switcher-default=""}}>{{trim|{{{6|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{8|}}}|<div>{{{7|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|4|data-switcher-default=""}}>{{trim|{{{8|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{8|}}}|<div>{{{7|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|4|data-switcher-default=""}}>{{trim|{{{8|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{10|}}}|<div>{{{9|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|5|data-switcher-default=""}}>{{trim|{{{10|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{10|}}}|<div>{{{9|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|5|data-switcher-default=""}}>{{trim|{{{10|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{12|}}}|<div>{{{11|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|6|data-switcher-default=""}}>{{trim|{{{12|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{12|}}}|<div>{{{11|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|6|data-switcher-default=""}}>{{trim|{{{12|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{14|}}}|<div>{{{13|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|7|data-switcher-default=""}}>{{trim|{{{14|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{14|}}}|<div>{{{13|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|7|data-switcher-default=""}}>{{trim|{{{14|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{16|}}}|<div>{{{15|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|8|data-switcher-default=""}}>{{trim|{{{16|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{16|}}}|<div>{{{15|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|8|data-switcher-default=""}}>{{trim|{{{16|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{18|}}}|<div>{{{17|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|9|data-switcher-default=""}}>{{trim|{{{18|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{18|}}}|<div>{{{17|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|9|data-switcher-default=""}}>{{trim|{{{18|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{20|}}}|<div>{{{19|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|10|data-switcher-default=""}}>{{trim|{{{20|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{20|}}}|<div>{{{19|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|10|data-switcher-default=""}}>{{trim|{{{20|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{22|}}}|<div>{{{21|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|11|data-switcher-default=""}}>{{trim|{{{22|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{22|}}}|<div>{{{21|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|11|data-switcher-default=""}}>{{trim|{{{22|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{24|}}}|<div>{{{23|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|12|data-switcher-default=""}}>{{trim|{{{24|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{24|}}}|<div>{{{23|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|12|data-switcher-default=""}}>{{trim|{{{24|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{26|}}}|<div>{{{25|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|13|data-switcher-default=""}}>{{trim|{{{26|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{26|}}}|<div>{{{25|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|13|data-switcher-default=""}}>{{trim|{{{26|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{28|}}}|<div>{{{27|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|14|data-switcher-default=""}}>{{trim|{{{28|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{28|}}}|<div>{{{27|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|14|data-switcher-default=""}}>{{trim|{{{28|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{30|}}}|<div>{{{29|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|15|data-switcher-default=""}}>{{trim|{{{30|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{30|}}}|<div>{{{29|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|15|data-switcher-default=""}}>{{trim|{{{30|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{32|}}}|<div>{{{31|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|16|data-switcher-default=""}}>{{trim|{{{32|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{32|}}}|<div>{{{31|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|16|data-switcher-default=""}}>{{trim|{{{32|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{34|}}}|<div>{{{33|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|17|data-switcher-default=""}}>{{trim|{{{34|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{34|}}}|<div>{{{33|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|17|data-switcher-default=""}}>{{trim|{{{34|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{36|}}}|<div>{{{35|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|18|data-switcher-default=""}}>{{trim|{{{36|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{36|}}}|<div>{{{35|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|18|data-switcher-default=""}}>{{trim|{{{36|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{38|}}}|<div>{{{37|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|19|data-switcher-default=""}}>{{trim|{{{38|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{38|}}}|<div>{{{37|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|19|data-switcher-default=""}}>{{trim|{{{38|}}}}}</span></div>}}<noinclude><!-- |
||
-->{{#if:{{{40|}}}|<div>{{{39|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|20|data-switcher-default=""}}>{{trim|{{{40|}}}}}</span></div>}}<!-- |
--></noinclude>{{safesubst<noinclude />:#if:{{{40|}}}|<div>{{{39|}}}<span class="switcher-label" style="display:none" {{safesubst<noinclude />:#ifeq:{{{default|}}}|20|data-switcher-default=""}}>{{trim|{{{40|}}}}}</span></div>}}<noinclude><!-- |
||
--></div><noinclude> |
--></noinclude></div><noinclude> |
||
{{Documentation}} |
{{Documentation}} |
||
</noinclude> |
</noinclude> |
Revision as of 13:04, June 15, 2020
This template is used to create a switchable image with caption, for use in infoboxes. Note that this template does not work in the editing preview.
Parameters
Odd numbered parameters provide the image in wikitext; even numbered parameters provide the captions.
Example
{{Switcher | [[File:Example.png|300px]] | An example | [[File:Example image not to be used in article namespace.jpg|300px]] | A different example }}
Output:
TemplateData
Creates a switchable image with caption for use in infoboxes
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | Image 1 wikitext
| Unbalanced wikitext | optional |
2 | 2 | Image 1 caption
| String | optional |
3 | 3 | See {{{1}}} (recursive) | Unbalanced wikitext | optional |
4 | 4 | See {{{2}}} (recursive) | String | optional |