Dynamic Code Tags
This topic provides examples of tags that you can use for dynamic code.
You must put your dynamic code between {dynamic_code}
tags.
Syntax:
{dynamic_code}
{<dynamic tag> <your dynamic code>}
{/<close dynamic tag>}
{/dynamic_code}
Tag | Example |
---|---|
{if}
|
It is the only operator allowed as the first element of a block and can contain additional operators and comparison expressions. |
{elseif} |
It cannot appear after the |
{else} |
The It does not contain additional operators and comparison expressions. The
|
{literal}
|
In the code example above, the curly braces contained in the literal tags will be output verbatim and will be ignored by the Dynamic Code processor. Literal tags are placed around content that is displayed to your contacts when the Dynamic Code conditions are met. These tags will display the literal content within them, including anything in curly braces that might otherwise be interpreted as Dynamic Code. Note: If you choose not to use literal tags, then you can add nested logic to
your Dynamic Code. In the absence of literal tags, dynamic code (actually
anything in curly braces) will be treated as if it is Dynamic Code. Hence,
if you try and use curly braces outside of literal tags, and the curly
braces are not part of valid Dynamic Code syntax, you will receive an error.
|
{loop}
|
Loop tags are specially formatted API message tags that allow content to be passed in via API Message tags as an array. This an especially useful feature to use with transactional email messages. For more information about loop tags see API Loop Tags. |
{cart_loop}
|
The For more information about cart loops see Cart Loop Tags. |
API Loop |
API loop tags are specially formatted API message tags that allow content to be passed in via API Message tags as an array. This an especially useful feature to use with transactional email messages. For more information see API Loop Tags. |