Jump to content

Template:Calculator-hideifzero/doc

From Wikipedia, the free encyclopedia

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

Template parameters

ParameterDescriptionTypeStatus
blockblock

Whether to be a block (div) element or an inline (span) element

Booleanoptional
classclass

Additional css classes

Stringoptional
starthiddenstarthidden

Have the text start off being not shown

Booleanoptional
stylestyle

Additional CSS to add

Stringoptional
formulaformula

Calculator formula to decide whether or not to show

Stringrequired
class-liveclass-live

Additional css classes to add only once gadget is active

Stringoptional
texttext 1

Wikitext to show or hide

Contentrequired