Email templates
Templates for email notifications are available in Sitecore Content Hub and can be used to ensure consistent communication and branding across your content. You can edit the content of these templates, combining plain text, variables, and dynamic fields as needed. After editing a template, you can send a test email to confirm the effects of your changes.
Email templates are defined as entities of the type M.Mailing.Template and have the following structure:
|
Property |
Description |
Variables |
|---|---|---|
|
|
A unique name for the email template. |
Not supported |
|
|
The description of what the template is used for. |
Not supported |
|
|
A list of variables that can be used in the body of the email template. |
Not supported |
|
|
The subject of the email template. |
Supported |
|
|
The body of the email template. |
Supported |
Localization
For users to receive localized versions of emails, they must specify the display language in their user profile. If no language is defined, the email is sent using the first available culture in the Culture setting.
Dynamic content
Content Hub uses the Handlebars templating language to generate emails with dynamic fields. You can use Handlebar syntax in the subject or body of the email template to render dynamic content.
Specific Content Hub methods are available to use properties from entity definitions as described in the following table:
|
Method definition |
Description |
Use |
|---|---|---|
|
|
Performs an equality check between |
|
|
|
Performs an operation on |
|
|
|
Generates a link to a Content Hub page (for example, |
|
|
|
Generates a URL based on your Content Hub instance using a relative path (for example, |
|
|
|
Formats a string using the specified variables. Use square brackets instead of braces for variables. Javascript uses braces for object notation (for example, How's your Monday going?). |
|
|
|
Generates the URL of an attachment included in the email (for example, |
|