Overview
You can create and store reusable HTML snippets in Cordial's HTML Content Editor and Library. This content can then be included in a message dynamically using Cordial's template syntax (Smarty).
This is useful for referencing the same content across multiple messages. For example, header or footer content used across many messages could be saved in the HTML content library. Any edits to that content would cascade across all messages referencing that content.
HTML content is also helpful for referencing large blocks of experiment code or performing advanced Smarty functions. By storing these code blocks in HTML content, your actual message content will be cleaner and easier to manage.
Other use cases include reusable code snippets such as external content, supplement data, event data, Smarty code, and mobile in-app message templates.
Create HTML content
1. Navigate to Content > HTML Content.
2. Click New and fill out the required fields:
- Name: The name will be used for reference in the UI.
- Key: The key is used for referencing content in a message. The key must be unique, and contain no spaces or special characters.
- Description: Used for your own organizational purposes.
- Tags: You can tag the content to easily find and use it across the Cordial platform.
3. Enter the HTML content and click Save.
The use of proper HTML markup is highly recommended to avoid message rendering issues. Using HTML block elements within inline elements could distort rendered content.
Use HTML content in a message
1. Edit a draft message or create a new message.
2. Select Edit in the Message Content pane.
3. Reference the HTML content using Cordial's template syntax (Smarty):
- Click the HTML content library button at the top of the edit message window.
- From the table, click the HTML content item you want to use.
4. The Smarty include will appear in your message content.
5. You could alternatively copy the code from the Tags column and paste it in your message.
Ex: {include 'content:example'}
For more advanced use of HTML content in messages, visit our article about using Smarty with HTML content.
Comments
0 comments
Please sign in to leave a comment.