Template:Switcher: Difference between revisions
Jump to navigation
Jump to search
Ozycaevias (talk | contribs) m (1 revision imported) |
en>Jonesey95 (trim to prevent span tags wrapping to new line (Linter error)) |
||
Line 1: | Line 1: | ||
<div class="switcher-container"><!-- | <div class="switcher-container"><!-- | ||
-->{{#if:{{{2|}}}|<div>{{{1|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|1|data-switcher-default=""}}>{{{2|}}}</span></div>}}<!-- | -->{{#if:{{{2|}}}|<div>{{{1|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|1|data-switcher-default=""}}>{{trim|{{{2|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{4|}}}|<div>{{{3|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|2|data-switcher-default=""}}>{{{4|}}}</span></div>}}<!-- | -->{{#if:{{{4|}}}|<div>{{{3|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|2|data-switcher-default=""}}>{{trim|{{{4|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{6|}}}|<div>{{{5|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|3|data-switcher-default=""}}>{{{6|}}}</span></div>}}<!-- | -->{{#if:{{{6|}}}|<div>{{{5|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|3|data-switcher-default=""}}>{{trim|{{{6|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{8|}}}|<div>{{{7|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|4|data-switcher-default=""}}>{{{8|}}}</span></div>}}<!-- | -->{{#if:{{{8|}}}|<div>{{{7|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|4|data-switcher-default=""}}>{{trim|{{{8|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{10|}}}|<div>{{{9|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|5|data-switcher-default=""}}>{{{10|}}}</span></div>}}<!-- | -->{{#if:{{{10|}}}|<div>{{{9|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|5|data-switcher-default=""}}>{{trim|{{{10|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{12|}}}|<div>{{{11|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|6|data-switcher-default=""}}>{{{12|}}}</span></div>}}<!-- | -->{{#if:{{{12|}}}|<div>{{{11|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|6|data-switcher-default=""}}>{{trim|{{{12|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{14|}}}|<div>{{{13|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|7|data-switcher-default=""}}>{{{14|}}}</span></div>}}<!-- | -->{{#if:{{{14|}}}|<div>{{{13|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|7|data-switcher-default=""}}>{{trim|{{{14|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{16|}}}|<div>{{{15|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|8|data-switcher-default=""}}>{{{16|}}}</span></div>}}<!-- | -->{{#if:{{{16|}}}|<div>{{{15|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|8|data-switcher-default=""}}>{{trim|{{{16|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{18|}}}|<div>{{{17|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|9|data-switcher-default=""}}>{{{18|}}}</span></div>}}<!-- | -->{{#if:{{{18|}}}|<div>{{{17|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|9|data-switcher-default=""}}>{{trim|{{{18|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{20|}}}|<div>{{{19|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|10|data-switcher-default=""}}>{{{20|}}}</span></div>}}<!-- | -->{{#if:{{{20|}}}|<div>{{{19|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|10|data-switcher-default=""}}>{{trim|{{{20|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{22|}}}|<div>{{{21|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|11|data-switcher-default=""}}>{{{22|}}}</span></div>}}<!-- | -->{{#if:{{{22|}}}|<div>{{{21|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|11|data-switcher-default=""}}>{{trim|{{{22|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{24|}}}|<div>{{{23|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|12|data-switcher-default=""}}>{{{24|}}}</span></div>}}<!-- | -->{{#if:{{{24|}}}|<div>{{{23|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|12|data-switcher-default=""}}>{{trim|{{{24|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{26|}}}|<div>{{{25|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|13|data-switcher-default=""}}>{{{26|}}}</span></div>}}<!-- | -->{{#if:{{{26|}}}|<div>{{{25|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|13|data-switcher-default=""}}>{{trim|{{{26|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{28|}}}|<div>{{{27|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|14|data-switcher-default=""}}>{{{28|}}}</span></div>}}<!-- | -->{{#if:{{{28|}}}|<div>{{{27|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|14|data-switcher-default=""}}>{{trim|{{{28|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{30|}}}|<div>{{{29|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|15|data-switcher-default=""}}>{{{30|}}}</span></div>}}<!-- | -->{{#if:{{{30|}}}|<div>{{{29|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|15|data-switcher-default=""}}>{{trim|{{{30|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{32|}}}|<div>{{{31|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|16|data-switcher-default=""}}>{{{32|}}}</span></div>}}<!-- | -->{{#if:{{{32|}}}|<div>{{{31|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|16|data-switcher-default=""}}>{{trim|{{{32|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{34|}}}|<div>{{{33|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|17|data-switcher-default=""}}>{{{34|}}}</span></div>}}<!-- | -->{{#if:{{{34|}}}|<div>{{{33|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|17|data-switcher-default=""}}>{{trim|{{{34|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{36|}}}|<div>{{{35|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|18|data-switcher-default=""}}>{{{36|}}}</span></div>}}<!-- | -->{{#if:{{{36|}}}|<div>{{{35|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|18|data-switcher-default=""}}>{{trim|{{{36|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{38|}}}|<div>{{{37|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|19|data-switcher-default=""}}>{{{38|}}}</span></div>}}<!-- | -->{{#if:{{{38|}}}|<div>{{{37|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|19|data-switcher-default=""}}>{{trim|{{{38|}}}}}</span></div>}}<!-- | ||
-->{{#if:{{{40|}}}|<div>{{{39|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|20|data-switcher-default=""}}>{{{40|}}}</span></div>}}<!-- | -->{{#if:{{{40|}}}|<div>{{{39|}}}<span class="switcher-label" style="display:none" {{#ifeq:{{{default|}}}|20|data-switcher-default=""}}>{{trim|{{{40|}}}}}</span></div>}}<!-- | ||
--></div><noinclude> | --></div><noinclude> | ||
{{Documentation | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 20:35, 17 February 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 |