Template:Yesno/doc: Difference between revisions

no edit summary
m (1 revision imported: more wiki stuff)
No edit summary
Line 6:
| Yesno-yes = {{High-use|84449}}
}}
{{tlx|Yesno}} (or {{tlg|YesNo|nolink=on|code=on}}) evaluates any input and produces a normalized <samp>yes</samp> or <samp>no</samp>nil output, based on the content of the input and several configurable options. It is not used in article prose, but in coding complex templates.
 
== Usage ==
Line 16:
# '''Anything else''': e.g. {{tlx|Yesno|Purple monkey dish washer}}
 
By default, the template returns "yes" in the first and last case but returns nil (blank, empty string) in the other cases.
 
Two short-hand templates for the most common uses that override the default behavior:
Line 47:
===Logical distinctions===
 
{| class=wikitable border=1 cellpadding=2 style="text-align:left; width:100%;"
|-
! colspan=7 style="background:#d0d0d0;" | Overview of {{tlx|yesno}} ''logical values'' and their associated texts
Line 185:
<templatedata>
{
"description": "This template normalises an input to be a yes/no or nil output.",
"params": {
"1": {
Line 227:
</templatedata>
 
<includeonly>{{Sandbox other||
 
{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!----CATEGORIES BELOW THIS LINE, PLEASE:---->
[[Category:Boolean, register, and condition testing templates]]
 
}}
}}</includeonly>
Anonymous user