Template:Yesno

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search
Documentation for Template:Yesno [view] [edit] [history] [purge] (How does this work?)
{{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:

  • 0
  • false
  • f
  • no
  • n
  • off
  • 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}}