Jump to content

Do not begin to migrate content here, it may be wiped without notice. More info.

Template:MaybeBoolean

From Debian Wiki
Revision as of 19:15, 6 September 2025 by AndrewSayers (talk | contribs)
<onlyinclude>{{#switch: {{lc:{{{1|}}}}}
| 0
| no
| off
| false
| disabled = 0
| 1
| on
| yes
| true
| enabled = 1
| {{{1|}}}
}}</onlyinclude>

Convert boolean-like parameters ("no", "true" etc.) to 0 or 1, leave other parameters unchanged. Please call this from other templates to sanitise your boolean values.

Template parameters

ParameterDescriptionTypeStatus
Value1

Value to convert to a boolean

Suggested values
0 no false disabled 1 yes true enabled
Example
yes
Unknownrequired