Forum Discussion
roebuckl
8 months agoActive Member
Liquid Country Help Please!
I am trying to create a piece of dynamic content that shows for multiple countries. I have created this code which worked a few weeks ago, but now isn't working: {% if {{${country}}} == 'ID' and '...
Stuart
Practitioner III
I've started using Case/When more and more for things like this. I think it's cleaner than if/elsif. Eg:
{% assign country = {{${country}}} %}
{% case country %}
{% when "GB" %}
Copy for GB
{% when "FR", "AR" %}
Copy for FR or AE
{% when "TR" %}
Copy for TR
{% else %}
Copy for everyone else
{% endcase %}
Related Content
- 6 months ago