Template:Switcher
From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history
Documentation[edit source]
Use radio buttons to choose between displaying different images or values.
Default[edit source]
{{Switcher|A|1|B|2|C|3|D|4|default=4}}
A
B
C
D
Horizontal options[edit source]
Won't work - might need display:inherit on Javascript
Removing 'show all'[edit source]
Radio button example[edit source]
{{Radio_button_input}}
off
on
off
on
Examples[edit source]
This relies on:
- including a switcher-label class, in a span, somewhere in the page where you wish to use it:
<span class="switcher-label"></span>
- MediaWiki:Gadget-switcher.js - see documentation on Wikipedia
- MediaWiki:Gadgets-definition which loads and enables MediaWiki:Gadget-switcher.js for all users
This template is undocumented.
Examples of how to use it can be found at The Wikipedia Testcases page
The above documentation is transcluded from Template:Switcher/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |