Forum Discussion
roebuckl
9 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
8 months agoPractitioner 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
- 7 months ago