Jump to content

Template:Yesno

From Neptunia Wiki


Documentation icon Template documentation[view] [edit] [history] [purge]
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|<"9">}} gives...

TemplateData

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

Template parameters[Edit template data]

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