Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does dynamic Mandrill template support iteration over a collection?

I would like to add dynamic content to my e-mail, part of it being a collection of items (e.g. list of books). I would like Mandrill to render each of these items once (e.g. one table row per book). Is it possible to use for-loop in Mandrill somehow?

like image 845
marcelka Avatar asked Sep 29 '14 15:09

marcelka


1 Answers

Yes! Mandrill now offers full support for dynamic iteration over a list when you use the Handlebars templating language.

Here's how to do it:

  • Blog post and introduction — includes examples
  • Technical documentation
like image 110
Anirvan Avatar answered Sep 28 '22 09:09

Anirvan