Template:Switch

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

Note: this is now built-in to MediaWiki as a Parser function. For performance reasons, the built-in parser function #switch is preferred

Usage

{{switch
 |VALUE-TO-BE-TESTED
 |case foo=hello
 |case bar=world
 |default=Neither ''foo'' nor ''bar''
}}

where VALUE-TO-BE-TESTED is a parameter or a variable.

Caution: The tested value must not contain "|" or "=".