How can we help?

HTML Content

Overview

In addition to images, Cordial provides a way to store reusable HTML snippets in the 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.

Learn more about advanced HTML content using Smarty.

Adding HTML Content

  1. Navigate to Content › HTML Content
  2. Click the button labeled "+New".
  3. 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.
  4. Paste the HTML content and click "Save".
Note: 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.

Using HTML Content in a Message

  1. Edit a draft message or create a new message.
  2. Reference the HTML content using Cordial's Template Syntax (Smarty).
    • Click the "insert HTML content" button in 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, see the article about using Smarty with HTML content.

Comments

0 comments

Please sign in to leave a comment.