Can anyone explain how to iterate over a list of things in a HTML email please?
I have cobbled together a HTML email and I want to repeat a box/table for each item resulting from a search.
I can list all the results of the search in a single box/table using format as text option but don’t know what is syntax to allow looping for what is a dynamic list.
I am using the Richer Postmark Plugin and inputting the HTML in the HTML box.
Any help would be appreciated - thanks.
Something like this?
<!-- static text -->
<table>
<tr class="table-header">
<td>heading column 1</td>
<td>heading column 2</td>
<td>heading column 3</td>
</tr>
<!-- loop list using formatted as text -->
<tr class="item-row">
<td>{{ dynamic.value1 }}</td>
<td>{{ dynamic.value2}}</td>
<td>{{ dynamic.value3 }}</td>
</tr>
</table>
1 Like
I think I have used a few different way to do this. <br>
I think is what I would put in sometimes. You can put it right before your text or use the delimiter, depending on how you have things set up.
1 Like
Thanks for your response Alan, but not quite what I need - I think.
I see that you have provided html for a 3 column table but how do I get the class = “item-row” to activate in my template?
This topic was automatically closed after 70 days. New replies are no longer allowed.