Collection.liquid

From Spiffy Stores Knowledge Base

Revision as of 18:08, 16 September 2008 by Admin (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This template is used to render a collection of products.

You can access all the products related to the current collection using collection.products.

For example:

<ul>
{% for product in collection.products %}
  <li><a href="{{ product.url }}">{{ product.title }}</a></li>
{% endfor %}
</ul>

Variables

In collection.liquid you have access to the following variables:

  • collection - The current collection being displayed.
  • handle - The handle of the collection.
  • current_tags - The current tags filtering this collection.

In addition, all global variables are available.