sendgrid / email-templates

A repository of common email templates to use and modify to your heart's content.
https://sendgrid.com
MIT License
818 stars 987 forks source link

How to add (gt, lt, eq) condition in handlebarjs for sendgrid email? #77

Open mariokam opened 5 years ago

mariokam commented 5 years ago

Actual Behaviour

It returns The template you provided is invalid.

<!--{{#if (&gt; 1 2) }}-->
foo
<!--{{else}}-->
bar
<!--{{/if}}-->

Expected Behaviour

bar should be displayed

Steps to reproduce it

Use Sendgrid Email Design Editor and just add code block and try it.

mariokam commented 5 years ago

Or at least something like

<!--{{#if 1 > 2 }}-->
foo
<!--{{else}}-->
bar
<!--{{/if}}-->