Jump to content

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

Template:MaybeBoolean: Difference between revisions

From Debian Wiki
Created page with "<pre><onlyinclude>{{#switch: {{{1|}}} | 0 | no | off | false | disabled = 0 | 1 | on | yes | true | enabled = 1 | {{{1|}}} |}</onlyinclude></pre> <templatedata> { "params": { "1": { "label": "Value", "description": "Value to convert to a boolean", "example": "yes", "type": "unknown", "suggestedvalues": [ "0", "no", "false", "disabled", "1", "yes", "true", "enabled" ], "required": true } }, "description": "Conver..."
 
Redirected page to Template:SanitiseBoolean
Tag: New redirect
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre><onlyinclude>{{#switch: {{{1|}}}
#redirect [[Template:SanitiseBoolean]]
| 0
| no
| off
| false
| disabled = 0
| 1
| on
| yes
| true
| enabled = 1
| {{{1|}}}
|}</onlyinclude></pre>
<templatedata>
{
"params": {
"1": {
"label": "Value",
"description": "Value to convert to a boolean",
"example": "yes",
"type": "unknown",
"suggestedvalues": [
"0",
"no",
"false",
"disabled",
"1",
"yes",
"true",
"enabled"
],
"required": true
}
},
"description": "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."
}
</templatedata>

Latest revision as of 15:14, 7 September 2025