Reputation: 1
We are injecting a modal in our site, which is being build using Shopify liquid templates. And we want to change the css of that modal according to the url change. I have tried window global object but it is not working as it involve server side rendering. also page.url and request.url global liquid object didn't worked for me.
Liquid file structure
I am new to Shopify liquid template, Please help me here. Thanks and regards
Upvotes: 0
Views: 1507
Reputation: 306
Try with a case
statement and change your CSS based on the page handle:
{% case page.handle %}
{% when 'page-handle-one' %}
do something...
{% when 'page-handle-two' %}
do something else...
{% else %}
{% endcase %}
Upvotes: 0