Email template dynamic fields
The following table lists dynamic fields that can be included in email templates:
Field |
Description |
Example |
Result |
---|---|---|---|
ifCond_long |
Displays email content wrapped inside the pair of tags when conditions in the first tag are met. The value parameters must be integers and the available operators are:
|
|
This is shown |
operation_long |
Displays the result of a mathematical expression. The value parameters must be integers and the available operators are |
|
3 |
string_format |
Displays a formatted string based on static text and one or more inserted variables. Variables are inserted using bracketed, numbered tokens, and the order in which they are inserted depends on the order they are listed after the string. |
|
Hello Test user |
m_page_url |
Generates links to a portal page. The parameter can be a page name, or a page name plus an |
|
Redirects to the Assets page. Redirects to the asset details page of the asset with an |
m_url |
Generates absolute URLs to the Sitecore Content Hub instance. It takes a single argument, which is a relative path. |
|
|
IsNotNullOrWhiteSpace |
Displays whatever is written inside the pair of tags, if a specific variable contains a value that is not whitespace. |
|
This is shown |
IsNullOrWhiteSpace |
Displays whatever is written inside the pair of tags, if a specific variable is either null or contains only whitespace. |
|
This is shown |
All dynamic field syntax is case-sensitive. Ensure that field names and tags match exactly to avoid errors.
To render raw HTML in an email template, wrap the variable in triple curly braces, for example {{{variable_name}}}
. If you use double braces ({{variable_name}}
), the HTML tags will be escaped and shown as text instead of being rendered.