How to add if statement to HTML email? | Community
Skip to main content
Answered

How to add if statement to HTML email?

  • April 2, 2023
  • 2 replies
  • 297 views

How to add if statement to HTML email?

Best answer by Kevin Bendixen

@Roy Horev  Can you tell us a bit more about your case? What are you trying to achieve? HTML is not able to use logical statements like that (not an expert, though). 

2 replies

Kevin Bendixen
Top Expert ✨
Forum|alt.badge.img+5

@Roy Horev  Can you tell us a bit more about your case? What are you trying to achieve? HTML is not able to use logical statements like that (not an expert, though). 


@Kevin Bendixen I am looking for a similar feature. In my case, I'd like to evaluate if a specific user attribute equals a certain value and display something differently if that's the case. In our case we'd use it for localizing the template. I'd expect to be able to use something like this:

{% if language == "de" %}
German text
{% else %}
English text
{% endif %}