Menu icon Foundation
Handlebars inside of emails

I'm using Foundation Email to create email templates for mandrill. Mandrill allows handlebars inside of my templates. I'm wondering if anyone has a good way to manage this inside of the email tasks.  Right now what I do is I test the email locally with my test data, then I change all handlebars from {{ to \{{ so gulp ignores them.

It would be great if I didn't have to worry about this.  Are there any settings or something I can do to toggle handlebar rendering on/off?  I guess I could always update the gulpfile on my build task to prepend \ to all {{ so I wouldn't have to worry about user error.

Any thoughts?

Handlebarsemailmandrill

I'm using Foundation Email to create email templates for mandrill. Mandrill allows handlebars inside of my templates. I'm wondering if anyone has a good way to manage this inside of the email tasks.  Right now what I do is I test the email locally with my test data, then I change all handlebars from {{ to \{{ so gulp ignores them.

It would be great if I didn't have to worry about this.  Are there any settings or something I can do to toggle handlebar rendering on/off?  I guess I could always update the gulpfile on my build task to prepend \ to all {{ so I wouldn't have to worry about user error.

Any thoughts?

Rafi Benkual about 3 years ago

You can comment out the panini pipe in the gulpfile. You can also wrap sections in 

{{{raw}}}content to ignore{{{/raw}}}