Template:MaybeBoolean: Difference between revisions
Appearance
AndrewSayers (talk | contribs) No edit summary |
AndrewSayers (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<pre><onlyinclude>{{#switch: {{{1|}}} | <pre><onlyinclude>{{#switch: {{lc:{{{1|}}}}} | ||
| 0 | | 0 | ||
| no | | no |
Revision as of 19:15, 6 September 2025
<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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Value | 1 | Value to convert to a boolean
| Unknown | required |