Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added collection.image support

  • Loading branch information...
commit 40ab8fa7a49b72bbcd5a429064d2d613c3cd28e2 1 parent da2b4fb
@carolineschnapp carolineschnapp authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 snippets/collection-listing.liquid
View
5 snippets/collection-listing.liquid
@@ -11,8 +11,9 @@
{% unless collection.handle == 'frontpage' %}
<li{% cycle '', '', '', '', ' class="last-in-row"' %}>
<div class="product-photo">
- <a href="{{ collection.url }}" title="Browse our {{ collection_title }} collection">
- {{ collection.products.first.featured_image | product_img_url: 'compact' | img_tag: collection_title }}
+ <a href="{{ collection.url }}" title="Browse our {{ collection_title }} collection">{% if collection.image %}
+ {{ collection.image.src | collection_img_url: 'compact' | img_tag: collection_title }}{% else %}
+ {{ collection.products.first.featured_image | product_img_url: 'compact' | img_tag: collection_title }}{% endif %}
</a>
</div>
<div class="product-desc">
Please sign in to comment.
Something went wrong with that request. Please try again.