Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{{.}} not working for lists, take 2 #7

Open
tobinibot opened this issue May 26, 2017 · 1 comment
Open

{{.}} not working for lists, take 2 #7

tobinibot opened this issue May 26, 2017 · 1 comment

Comments

@tobinibot
Copy link

tobinibot commented May 26, 2017

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.

@celluj34
Copy link

The syntax is not the same as mustache. Use it as follows (note the difference being the each statement):

{{#each list}}
  {{.}}
{{/each}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants