Template:Calculator-hideifzero
Appearance
Usage
[edit]Allows showing or hiding page elements based on a {{Calculator}} formula. This requires the Calculator gadget to work.
Example
[edit]{{calculator-hideifzero|Some text that might be hidden if the checkbox is unchecked|formula=showtext}} {{calculator|type=checkbox|id=showtext|default=1}} {{calculator label|Show text|for=showtext}}
Creates:
Some text that might be hidden if the checkbox is unchecked
1 Show text
Template data
[edit]Allow showing or hiding a page element based on a calculator formula
Parameter | Description | Type | Status | |
---|---|---|---|---|
block | block | Whether to be a block (div) element or an inline (span) element | Boolean | optional |
class | class | Additional css classes | String | optional |
starthidden | starthidden | Have the text start off being not shown | Boolean | optional |
style | style | Additional CSS to add | String | optional |
formula | formula | Calculator formula to decide whether or not to show | String | required |
class-live | class-live | Additional css classes to add only once gadget is active | String | optional |
text | text 1 | Wikitext to show or hide | Content | required |