Skip to content

Instantly share code, notes, and snippets.

@zachharkey
Created August 15, 2013 03:55
Show Gist options
  • Save zachharkey/6238147 to your computer and use it in GitHub Desktop.
Save zachharkey/6238147 to your computer and use it in GitHub Desktop.
<div class="clearfix image-subcats">
<!-- Begin image subcats -->
{% if settings.collection_tags %}
{% capture col_url%}{% if collection.url.size == 0 %}/collections/all{%else%}{{collection.url}}{%endif%}{%endcapture%}
{% if collection.all_tags.size > 0 %}
{% for tag in collection.all_tags %}
<div class="product span3">
<div class="image">
<a href="{{col_url}}/{{tag | handle}}">
{% capture file_name %}{{ collection.handle }}-{{ tag | handle }}.jpg{% endcapture %}
{% capture alt_attr %}{{ collection.title | escape }}-{{tag | handle}}{% endcapture %}
{{ file_name | asset_url | img_tag: alt_attr }}
</a>
</div>
<h3>{{ tag | link_to_tag: tag }}</h3>
</div>
{% endfor %}
{% endif %}
{% endif %}
<!-- End image subcats -->
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment