960
edits
(Document the usage) |
(Add default functionality) |
||
Line 1: | Line 1: | ||
<includeonly>{{{ {{{switch}}} }}}</includeonly><noinclude> | <includeonly>{{{ {{{switch|{{{default}}}}}} }}}</includeonly><noinclude> | ||
=Usage= | =Usage= | ||
Use the "switch" argument to select which argument to show: | Use the "switch" argument to select which argument to show: | ||
Line 5: | Line 5: | ||
*<nowiki>{{{Switch|yes=yay|no=nay|switch=no}}}</nowiki> will show "nay" | *<nowiki>{{{Switch|yes=yay|no=nay|switch=no}}}</nowiki> will show "nay" | ||
</noinclude> | </noinclude> | ||
The "default" argument will be used when the "switch" value doesn't match any of the options or that's empty: | |||
*<nowiki>{{{Switch|yes=yay|no=nay|default=maybe|switch=err}}}</nowiki> will show "maybe" |
edits