Last active
May 21, 2019 00:33
-
-
Save tinotriste/5328126 to your computer and use it in GitHub Desktop.
Shopify: Find current URL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign current_url = '' %} | |
{% case template %} | |
{% when 'page' %} | |
{% assign current_url = page.url %} | |
{% when 'blog' %} | |
{% assign current_url = blog.url %} | |
{% when 'article' %} | |
{% assign current_url = blog.url %} | |
{% when 'collection' %} | |
{% assign current_url = collection.url %} | |
{% when 'product' %} | |
{% assign current_url = product.url %} | |
{% endcase %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment