Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:MC/Simplecalc-hideifzero

Template page
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

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 other
The above text is transcluded from Template:MC/Simplecalc-hideifzero/doc; you can change it or view its history.
If 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.)
Contents