Skip to content

Instantly share code, notes, and snippets.

@carolineschnapp
Created February 11, 2012 01:54
Show Gist options
  • Save carolineschnapp/1795220 to your computer and use it in GitHub Desktop.
Save carolineschnapp/1795220 to your computer and use it in GitHub Desktop.
The Big Loop
<ul>
{% for collection in collections %}
{% unless collection.products_count == 0 %}
<li>
{{ collection.title | link_to: collection.url }}
{% if collection.all_tags.size > 0 %}
<ul>
{% for tag in collection.all_tags %}
{% capture url %}{{ collection.url }}/{{ tag | handle }}{% endcapture %}
<li>{{ tag | link_to: url }}</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endunless %}
{% endfor %}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment