Template:Yesno/doc: Difference between revisions
Jump to navigation
Jump to search
import>Halian Created page with "{{Documentation subpage}} {{tl|Yesno}} evaluates any input and produces a normalized <samp>yes</samp> or nil output, based on the content of the input and several configurable options. == Usage == The template distinguishes five different types of input, supplied on the first unnamed parameter: # '''Yes''': Case-insensitive forms of <code>Yes</code>, <code>y</code>, <code>true</code>, <code>on</code>, and <code>1</code> # '''No''': Case-insensitive forms of <code>No</c..." |
m 1 revision imported |
(No difference)
| |
Latest revision as of 05:23, 26 April 2026
Template:Documentation subpage
{{Yesno}} evaluates any input and produces a normalized yes or nil output, based on the content of the input and several configurable options.
Usage
The template distinguishes five different types of input, supplied on the first unnamed parameter:
- Yes: Case-insensitive forms of
Yes,y,true,on, and1 - No: Case-insensitive forms of
No,n,false,off, and0 - Nothing: When the input is defined but either contains no value or consists of whitespace character only
- Negation: When the input is either
¬(alt code 170) or entirely missing - Anything else
By default, the template returns "yes" in the first and last case but returns nil (blank, empty string) in the other cases.