2020.2

Table Of Contents
page327.
l
Currency no symbol does the same as Currency, but omits the currency symbol.
4. Close the Script Wizard. For a new script, don’t forget to add the selector to the template.
Showing content conditionally
One way to personalize content is to show or hide one or more elements depending on a field’s
value. For example, a paragraph written for Canadian customers could be hidden when the
recipient of the letter is not living in Canada, if that can be derived from the data.
The Conditional Script Wizard helps you to show or hide an element a paragraph, image or
other HTML element - based on the value of one or more data fields. For example, you could
check whether the data field 'State' is 'Equal To' the value 'British Columbia' or 'Québec', to
include a paragraph for all recipients in those states.
Showing or hiding elements using the Conditional Content Script wizard
1.
Select the element(s), right-click and choose Make Conditional. 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. The Conditional Content Script wizard opens.
2. 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388.)
3.
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 page343 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)
Page 349