Template:MC/Simplecalc-hideifzero
More actions
Template:Documentation header This template is borrowed from Wikipedia Template:Calculator-hideifzero.
Usage
Allows showing or hiding page elements based on Calculator formula.
Example
{{simplecalc-hideifzero|formula=showtext|Some text that might be hidden if the checkbox is unchecked}}
{{simplecalc|type=checkbox|id=showtext|default=1}} {{simplecalc label|Show text|for=showtext}}
Creates:
Template:Simplecalc-hideifzero
Template:Simplecalc Template:Simplecalc label
Template data
<templatedata> { "params": { "formula": { "description": "Calculator formula to decide whether or not to show", "type": "string", "required": true }, "text": { "aliases": [ "1" ], "description": "Wikitext to show or hide", "type": "content", "required": true }, "block": { "description": "Whether to be a block (div) element or an inline (span) element", "type": "boolean" }, "element": { "description": "Name of element to use (overrides block). For example, if you want to hide a list item, you would set this to li", "example": "li", "type": "string", "default": "span" }, "class": { "description": "Additional css classes", "type": "string" }, "starthidden": { "description": "Have the text start off being not shown", "type": "boolean" }, "style": { "description": "Additional CSS to add", "type": "string" }, "class-live": { "description": "Additional css classes to add only once gadget is active", "type": "string" } }, "description": "Allow showing or hiding a page element based on a calculator formula" } </templatedata>
Template:Sandbox otherIf you're done making changes, please refresh the text.
Please add categories and interwikis to Template:MC/Simplecalc-hideifzero/doc. (View all subpages of this page.)