mustachio
mustachio copied to clipboard
{{.}} not working for lists, take 2
I know that the author of #5 says it’s working when you send an actual email, but I have been unable to get it to work, either in the preview renderer or in a delivered email.
I’m using the template
{{#list}}
{{.}}
{{/list}}
and the JSON
{
"list": [
"xxx",
"yyy",
"zzz"
]
}
I’m just getting an empty body, in the preview and the delivered email. What gives, am I doing something wrong? This works out on the mustache demo page: https://mustache.github.io/#demo.
The syntax is not the same as mustache. Use it as follows (note the difference being the each
statement):
{{#each list}}
{{.}}
{{/each}}