How can we help?

HTML content


You can store reusable HTML snippets in Cordial's HTML content 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 useful 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.

Add 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.

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 </> button at the bottom of the edit message window.

  • Copy the code from the tag column of the appropriate HTML content row.
     Ex: {include 'content:example'}
  • Paste the code in the message.


For more advanced use of HTML content in messages, visit our article about using Smarty with HTML content.



Please sign in to leave a comment.