Created
December 6, 2011 02:23
-
-
Save jconnoll/1436411 to your computer and use it in GitHub Desktop.
Shopify - In product page get the collection it's in
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
{% for link in linklists[settings.sidebar_linklist_1].links %}{% for p in collections[link.object.handle].products %}{% if p.title == product.title %}{% assign: collectionName = link.object.handle %}{% endif %}{% endfor %}{% endfor %} | |
{% for link in linklists[settings.sidebar_linklist_1].links %} | |
<li><a href="{{ link.url }}"{% if link.url == active_url %} class="current"{% endif %}{% if template == 'article' and link.url == blog.url %} class="current"{% endif %}{% if collection.url == link.url %} class="current"{% endif %} | |
{% if link.handle == collectionName %} class="current"{% endif %} | |
>{{ link.title }}</a></li> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment