2022.1

Table Of Contents
Conditional Content script dialog
Conditional Content scripts can show or hide elements depending on certain conditions and
values. They can be added by right-clicking any element in a template and clicking Make
Conditional. If the current element has neither an ID nor a class, an ID will be automatically
generated. See "Showing content conditionally" on page354.
The general options in the Conditional Script wizard are:
l Name: The name of the script, making it easier to identify it.
l Selector: The Selector or Text to apply the result of the script to.
l Selector: Uses CSS selectors to find the element to which the script applies.
l Text: Uses text as a trigger for the script. The script applies to all instances of the
text found in the template.
l Selector and Text: Uses the specified selector as a trigger for the script. The script
applies to all instances of the text found within the specified Selector.
For more information about Selectors see "Selectors in Connect" on page410.
l Action: Use the drop-down to select whether to Show or Hide the element when the
condition below is true. If, conversely, the condition evaluates to false, the opposite action
will be performed.
A condition is made up of groups and rules.
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.
l Group:
A group consists of one or more rules with a logic operator. Four logic choices are
available at the Group level. These are:
l All of the following.
This equates to the logical operator (... AND ...).
If all of the associated criteria are met, then this group resolves to TRUE.
l Any of the following.
This equates to the logical operator (... OR ...).
If any of the associated criteria are met, then this group resolves to TRUE.
l Not all of the following.
This equates to the logical operator (NOT(... AND ...)).
Page 535