In Sendgrid Design template, how to use handlebar iteration for table?
I found a undocumented way to make this works. You will need to comment out the each
helper like this:
<table>
<tbody>
<!-- {{#each items}} -->
<tr>
<td>Col 1</td>
<td>Col 2</td>
</tr>
<!-- {{/each}} -->
</tbody>
</table>
I get the same issue. Definitely a bug in the Design Editor. My work around was to:
- Style the email with the Design Editor.
- Export HTML.
- Go back and create a new version of the transaction email using the 'Code Editor' and not the 'Design Editor'.
- Paste in the previously exported HTML.
- Find the table that needs the {{each}} loop and place the functions exactly as you did.