Template:choose
Jump to navigation
Jump to search
- The following documentation is located at Template:choose/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox
This template returns only one among multiple unnamed parameters. It is, technically, a cleaner and stricter variety of {{#switch:}}.
Usage
Just fill multiple unnamed (positional) parameters with contents and input a number to the named parameter |choice=
. If no number is input, "1" is assumed.
Examples
{{choose|cat|dog|mouse|choice=2}}
returns:
dog
{{choose|cat|dog|mouse|choice=3}}
returns:
mouse
{{choose|apple|pear|watermelon|banana|choice=1}}
returns:
apple
{{choose|apple|pear|watermelon|banana}}
returns:
apple
{{choose|apple|pear|watermelon|banana|choice=4}}
returns:
banana
See also
{{count}}