Template:Yesno/doc

This template normalises an input to be a yes/no output.

Usage
The template discerns five possible logical outputs depending on the first parameter (input if you will).

In its simplest usage these will all be either "yes" or "" (blank — nothing no characters).


 * 1)    results in ""  (also applies to "Yes", "YeS", etc, "Y", "y" and "1")
 * 2)    results in "" (also applies to "No", "NO", "nO", "N", "n" and "0")
 * 3)    results in ""
 * 4)    results in ""
 * 5)    result "" (also applies to any other value not given above).

Each of these can be over-ridden. Note that for the named parameters, use of a blank value is not the same as omitting the parameter, i.e. including def will have a different effect than omitting def entirely.


 * 1)     results in "" (also applies to "Yes", "YeS", etc, "Y", "y" and "1")
 * 2)    results in "": (also applies to "No", "NO", "nO", "N", "n" and "0")
 * 3)    results in ""
 * 4) but   </tt> results in ""
 * 5) and   </tt> results in ""
 * 6)   </tt> results in ""
 * 7)   </tt> results in "" (also applies to any other value not given above).
 * 8) but   </tt> results in ""
 * 9) and   </tt> results in ""
 * 10) and   results in ""

This may be used (apparently perversely) thus:


 *  </tt> results in ""
 *  </tt> results in ""

This creates a logical inversion.

Full parameter list
Unnamed parameter 1= the input value to be evaluated. The other parameters (all named, all optional), are the return values for their respective logical outcome. When set, each one overrules their default return value.

id:Templat:Yesno sl:Predloga:Yesno

TemplateData
{       "description": "This template normalises an input to be a yes/no output.", "params": { "1": {                       "label": "Value", "description": "The value to be evaluated", "type": "string", "required": true },               "yes": { "label": "Output on yes", "description": "Defines a value to output on yes", "type": "string", "required": false },               "no": { "label": "Output on no", "description": "Defines a value to output on no", "type": "string", "required": false },               "blank": { "label": "Output on blank input", "description": "Defines a value to output if blank input", "type": "string", "required": false },               "¬": {                        "label": "Output on ¬", "description": "Defines a value to output when input = ¬", "type": "string", "required": false },               "def": { "label": "Definite output", "description": "Defines the output when value = yes", "type": "string", "required": false }       } }