Difference between revisions of "Template:Boolean"
From Kerbal Space Program Wiki
(Add template to check for boolean values) |
m (Typo) |
||
Line 1: | Line 1: | ||
<includeonly>{{#switch: {{lc:{{{1}}}}} | <includeonly>{{#switch: {{lc:{{{1}}}}} | ||
− | |1|y|yes|t|true= | + | |1|y|yes|t|true={{Yes}} |
− | |0|n|no|f|false= | + | |0|n|no|f|false={{No}} |
|#default={{#if: {{{2|}}}|{{{2}}}|{{{1}}}}} | |#default={{#if: {{{2|}}}|{{{2}}}|{{{1}}}}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> |
Latest revision as of 08:13, 16 September 2024
This helper template will display {{Yes}} if its input is y
, yes
, t
, true
or 1
.
Will display {{No}} if its input is n
, no
, f
, false
or 0
.
If none of the inputs above match, will display the provided input. If you provide a second parameter, that works as default value, will display that.
Name | Optional | Description | Default |
---|---|---|---|
1 | No | The boolean value. | |
2 | Yes | The default value to display if {{{1}}} doesn't match any boolean value. | {{{1}}} |