Template:Switcher2
Usage edit
It allows to have up to 3 alternating images in a common space and selectable for your caption.
It is an evolved version of {{Switcher}}
, which was designed for static maps and had very large selection buttons.
The switcher2 version minimizes selector space with a format inspired by <gallery> mode = slideshow
, but located at the foot and doing selectable each of the images without having to follow an order.
The template has been designed to fit in the cell of a table with a size similar to a thumbnail.
Syntax edit
{{switcher2 |image1 = |caption1 = |image2 = |caption2 = |image3 = |caption3 = |width = nn}}
Or with positional parameters, as {{Switcher}}
works, where odd positions correspond to images and pairs to photo captions.
{{switcher2| <first image> | <first foot> | <second image> | <second foot> | <third image> | <third foot> | width=nn}}
Caption text is optional; in the positional version, space must be left. The template puts the image number, by default
The | width = nn
parameter is NOT positional and allows you to resize the images size in pixels (px).
Technical requirements edit
- Switcher2 styles and classes are stored in
{{Switcher2/styles.css}}
templatestyle.
- This JS scripts is required. It should be in Mediawiki:Common.js of the WP platform or, in a
user:<username>/Common.js
to be tested. Without this JS, the template does not switch images and show all of them together.
Examples edit
With 2 imates | With 3 images | |
---|---|---|
{{switcher2|image1=UTC+12.00.svg|caption1= |image2=Emojione 23F0.svg|caption2= }}
|
{{switcher2|image1=UTC+12.00.svg|caption1= |image2=Emojione 23F0.svg|caption2= |image3=Noto Emoji Oreo 1f949.svg |caption3= }}
| |
+ width=100 | ||
{{switcher2| UTC+12.00.svg| |Emojione 23F0.svg|}}
|
{{switcher2|Noto Emoji Oreo 1f947.svg ||Noto Emoji Oreo 1f948.svg ||Noto Emoji Oreo 1f949.svg |}}
| |
{{switcher2| UTC+12.00.svg|rellotge |Emojione 23F0.svg|despertador}}
|
{{switcher2|Noto Emoji Oreo 1f947.svg |or|Noto Emoji Oreo 1f948.svg |argent|Noto Emoji Oreo 1f949.svg |bronze}}
|
See also edit
The above documentation is transcluded from Template:Switcher2/doc (edit | history). Editors can experiment in this template's sandbox (create | mirror) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |