Template:Yesno
Jump to navigation
Jump to search
{{yesno|something}}
Converts the parameter into a normalized boolean value of either yes or the empty string. Intended to be used with {{#if:...}} as:
{{#if: {{yesno|{{{some parameter|}}}}} | ...}}
The following values are interpreted as logical "false" and result in the empty string being the output:
0falsefnonoff- Empty or whitespace-only inputs
Any other input will be interpreted as logical "true" and result in an output of yes.
Examples
{{yesno|yes}}→ yes{{yesno|1}}→ yes{{yesno|something random}}→ yes{{yesno|0}}→{{yesno|no}}→{{yesno|}}→{{yesno}}→