sendgrid / opensource

SendGrid Open Source Dashboard
http://github.com/sendgrid
MIT License
35 stars 13 forks source link

A question related to dynamic templates and the available handlebars syntax #21

Closed sarukuku closed 4 years ago

sarukuku commented 4 years ago

Hi! I was directed to submit an issue here by your support as they couldn't answer the technical question I had, so here I am. 😄

Is it somehow possible to do value based if or switch statements in the supported templating language? My use case would be something like if user.role == admin or if user.role == user.

I saw that this is only possible with Handlebars if you register a helper but was thinking if you have a workaround for it in place within your systems.

sarukuku commented 4 years ago

After extensive googling and testing I'm quite certain that the answer is no.