2022.1

Table Of Contents
l Select one or more elements, right-click and choose Make Conditional.
l Alternatively, click the black triangle on the New button on the Scripts pane at the bottom
left of the window, and click Conditional Content Script.
In the wizard, first make the following settings.
1. Rename the script so that it reflects what the script does.
Note
Scripts can only have the same name when they are not in the same folder. (See
"Managing scripts" on page925.)
2. Type a Selector. The selector selects one or more pieces of text or elements from the
template, so that the conditional content script can hide or show those pieces.
An ID (for example: #conditional-script) is best if you want to show or hide one element
only.
Use a class selector (for example: .conditional) if the script should show or hide more
than one element. See "Using the Text Script Wizard" on page849 for further explanation
on selectors.
When you start the Conditional Script Wizard by right-clicking an element, the Selector
field is pre-populated with the element's ID and class (or classes). If the element didn't
have an ID or class, it gets a new ID (or class, in case multiple elements were selected)
that is generated automatically.
If you'd want to change the selector later, you can do that after reopening the script
(double-click the name of the script in the Scripts pane).
3. Set the Action: use the drop-down to select whether to Show or Hide the element when
the condition below is true. When the condition evaluates to false, the opposite action is
performed.
Once these settings have been made, the condition can be build.
The Add button adds a rule that evaluates a data field to a group.
To add either a group, or a rule that evaluates a runtime parameter, click the downward
pointing arrow next to this button and select Group or Parameter Rule.
Page 857