Export this template, then import, to install it.
Use edit summary: Copied from [[w:c:templates:Template:Yesno]] to properly attribute this template's editors.
This template is probably not already on your wiki.
Description
This template is used to coerce boolean input to something that can be used in {{#if: }} parse functions.
Syntax
Type {{yesno|<value>}}
Sample output
{{yesno|1}} gives...
1
{{yesno|0}} gives...

TemplateData

This template normalises an input to be a truthy or nil output.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Input value1

The value to be evaluated

Stringrequired
Output on truetrue

Specifies the output of the template when the input value is a case-insensitive forms of 'Yes', 'Y', 'True' or '1'

Default
1
Stringoptional
Output on falsefalse

Specifies the output of the template when the input value is a case-insensitive forms of 'No', 'N', 'False, or '0'

Default
Stringoptional
Output on blank inputblank

Specifies the output of the template when the input value is defined but is either empty or contains nothing but whitespace character(s)

Default
Stringoptional
Output on ¬¬

Specifies the output of the template when the input value is either '¬' or entirely missing (undefined)

Default
Stringoptional
Definite outputdef

Specifies the output of the template when the input value is defined but not a form of 'yes', 'no', '1', '0', '¬' or blank

Default
{{{true}}}
Stringoptional
Community content is available under CC-BY-SA unless otherwise noted.