Skip to content

Instantly share code, notes, and snippets.

@Tetsuro
Created February 22, 2013 19:23
Show Gist options
  • Select an option

  • Save Tetsuro/5015903 to your computer and use it in GitHub Desktop.

Select an option

Save Tetsuro/5015903 to your computer and use it in GitHub Desktop.

Revisions

  1. tetchi created this gist Feb 22, 2013.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <div id="coll-product-list">
    {% capture current_handle %}{{ product.handle }}{% endcapture %}
    {% capture current_type %}{{ product.type }}{% endcapture %}
    {% assign how_many_we_got = 0 %}
    {% paginate collections.all-products.products by 100 %}

    {% for product in collections.all-products.products %}
    {% unless product.handle == current_handle %}
    {% if product.type == current_type and how_many_we_got < 4 %}
    {% assign how_many_we_got = how_many_we_got | plus: 1 %}
    {% include 'snippet-product-item' with 'four' %}
    {% endif %}
    {% endunless %}
    {% endfor %}
    {% endpaginate %}
    </div>