Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

Template:Documentation header

Usage

This template is used to make other templates by turning an input into either "Yes" or no text, so as to be able to accept multiple "true" or "false" inputs for certain functions. It transforms the input value into either "yes" or no text, as stated above. The following makes it return "yes":

  • 1
  • t
  • true
  • yes
  • y
  • on

The following makes the template return no text:

  • 0
  • f
  • false
  • no
  • n
  • off

The template, as such, makes the following return one output if a true input is provided and another output if a false input is given in a template transclusion:

{{#if:{{Yesno|{{{1}}}}}|first output|second output}}

The same can also be done with {{Yesno|{{{1|}}}|yes=first output|no=second output}}. This is because the true and false values can also be customized in the template to return outputs other than "yes" or no text.

Template:Sandbox other
The above text is transcluded from Template:MC/Yesno/doc; you can change it or view its history.
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:MC/Yesno/doc. (View all subpages of this page.)
Contents