Customising Code in Email Campaign Displays
This article covers the Custom Code tab of Email Campaign Displays. See also Customising Email Campaign Displays for all available custom options.
Editing HTML and CSS code for Email Campaign Displays
- From the left menu, browse to Engage > Email Campaigns.
- Click on the Edit button under the Actions column for the Display you wish to edit.
- On the Edit Display page, click on the Custom Code tab in the right sidebar. Then click on the button for the template you wish to edit.
- When done editing the code template, click on the bottom right Save Changes button to save your changes.
The following code templates are available in Email Campaign Displays:
- Display Template (HTML) – contains markup for the main Display.
- Tile Template (HTML) - contains markup for Tile layouts.
- CSS (Cascading Style Sheets) – contains CSS styles for the entire Display.
HTML Templates - Variables
A list of all variables along with descriptions is available directly within the template editor and can be accessed by clicking on the Allowed variables link at the bottom of the editor. All variables have the syntax: [[VARIABLE_NAME]]
HTML Templates - Allowed Functions and Operators
In addition to variables, HTML templates also support the following functions:[[IF ...]]
[[ELSEIF ...]]
[[ELSE]]
[[/IF]]
The following operators can be used with the above functions:||
- OR&&
- AND!
– NOT
Curly brackets ‘()’ can also be used to group conditions, for example:[[IF (A || B) && C ]]
…
[[/IF]]
CSS Template
This template contains all CSS styles for the entire Display. You can add your own additional styles or overrides at the end of the template, or directly edit any of the existing styles.
Updated on: 05/04/2023
Thank you!