Conditional Box Widget Custom Tag
Optional Box
<widget-switchBox attributes> ... </widget-switchBox>
The actual content for the optional box goes between the opening and closing <widget-switchBox>
tags.
True/False Switch Box
<widget-switchBox attributes> <widget-switchBox-content-true> ... </widget-switchBox-content-true> <widget-switchBox-content-false> ... </widget-switchBox-content-false> </widget-switchBox>
The order and nesting of the outer <widget-switchBox>
tags and the inner
<widget-switchBox-content-true>
and <widget-switchBox-content-false>
tags
is important and must be specified as shown above. Also there must not be any code outside of the two nested inner tags
(i.e. other code is allowed only in the places denoted with ...
in the sample above).
The actual content for the true content box part goes between the opening and closing
<widget-switchBox-content-true>
inner tags and that for the false content box goes between the
opening and closing <widget-switchBox-content-false>
inner tags.
Allowed attributes for the outer <widget-switchBox>
tag:
-
name: Defines the optional widget name. You can specify any name you like to label the widget. This name is shown in the widget hierarchy panel (in design mode) and makes it easier to identify the widget in the hierarchy. It also makes it easier it identify the widget here in code mode. However, the name is entirely optional and does not have any additional functional purpose.
Possible values: Any text
-
condition: Sets the mandatory widget condition for the switch box layout. For an optional box, the content will only be shown if this condition is true. For a true/false switch box, the true content part will only be shown if this condition is true and the false content part if the condition is false. See here about special issues when specifying a condition formula in code mode.
Possible values: Any valid calculation formula that does not have a number set or text set as its result.
Additional attributes when editing a standard template:
-
These additional attributes are only allowed when editing a standard template and if the widget is not already nested into a
template-editableBlock
. -
cloneable: Defines if this widget shall be cloneable by the template end user or not.
Possible values:
true
orfalse
-
conditioneditable: Defines if this widget shall allow the template end user to edit the widget condition (or define one, if the widget currently does not have one) or not.
Possible values:
true
orfalse
-
deletable: Defines if this widget shall be deletable by the template end user or not.
Possible values:
true
orfalse