Iterable merge paremeters have different brackets depending on whether it's a user object or a feed. These differences extend to functions operating on those parameters. For example, {{if}}
needs to be [[if]]
when evaluating a feed parameter.
{{firstName}}
[[firstName]]
{{#if firstName}}
Hello {{firstName}}
{{else}}
Hello Friend
{{/if}}
{{#unless firstName}}
You don't have a first name!
{{/unless}}
{{#ifEq age 21}}
Age is 21
{{/ifEq}}
{{#ifGt age 21}}
Age is over 21
{{/ifGt}}
{{#ifGte age 21}}
Age is greater than or equal to 21
{{/ifGte}}
{{#ifLt age 21}}
Age is less than 21
{{/ifLt}}
{{#ifLte age 21}}
Age is less than or equal to 21
{{/ifLte}}
{{#ifModEq age 21 0}}
Age % 21 == 0 (age is a multiple of 21)
{{/ifModEq}}
A loop will go through each item in a list. Your current position in the loop can be accessed with @index. Other Handlebars functions (such as conditionals) can be nested inside the loop.
{{#each story}}
{{title}}
{{/each}}
{{#minInList shoppingCartItems "price"}}
Those least expensive item in your cart is: {{price}}
{{/minInList}}
{{#maxInList shoppingCartItems "price"}}
Those most expensive item in your cart is: {{price}}
{{/maxInList}}
{{#urlEncode}}
{{myParam}}
{{/urlEncode}}
{{capitalizeFirst myUrl}}
{{ dateFormat date "yyyy-MM-dd HH:mm:ss" tz="America/Los_Angeles" }}
{{#breaklines}}some text or a {{handlebars_variable}}{{/breaklines}
- View in Browser URL: {{viewInBrowserUrl}}
- Unsubscribe URL: {{unsubscribeUrl}}
- Hosted Unsubscribe URL: {{hostedUnsubscribeUrl}}
- Unsubscribe Message Type URL: {{unsubscribeMessageTypeUrl}}
- Campaign Id: {{campaignId}}
- Recipient Email: {{email}}