Forum Discussion
If Statement in If Statement Liquid Code
Hey guys, hope you are well.
Please find below a liquid code which I cannot get on top of. I am trying to use an if statement into an if statement but cannot make it work. Any help please?
{% if api_trigger_properties.${XX_XX} == "XXX" %}{% if custom_attribute.${XX} == 'it_IT' or custom_attribute.${XX} == 'it_CH' %}ITALIAN COPY{% elsif custom_attribute.${XX} == 'es_ES' %}SPANISH COPY{% else %}ENGLISH COPY{% endif %}{% else %}{% if custom_attribute.${XX} == 'it_IT' or custom_attribute.${XX} == 'it_CH' %}TEXT IN ITALIAN{% elsif custom_attribute.${XX} == 'es_ES' %}TEXT IN SPANISH{% else %}TEXT IN ENGLISH{% endif %}{% endif %}
The error I am getting is:
- Liquid syntax error: 'if' tag was never closed
Thanks in advance for your help
- AllanHeoFNMStrategist II
hey Nicky22
I don't see any issues with your code nor was I getting that same error although I precisely copy/pasted your code.
- Nicky22Active Member
no that was an example
- DavidOStrategist II
Same as AllanHeoFNM I don't get any errors and the code executes correctly when I test it. Is there another IF tag earlier or later in your campaign that may not be closed? The old, one { will wreck your whole day.😂
Related Content
- 8 months ago