Collection.liquid: Difference between revisions
From Spiffy Stores Knowledge Base
New page: This template is used to render a collection of products. You can access all the products related to the current collection using ''collection.prod... |
No edit summary |
||
| Line 1: | Line 1: | ||
This template is used to render a collection of [[Liquid Template Variables - product|products]]. | This template is used to render a [[Liquid Template Variables - collection|collection]] of [[Liquid Template Variables - product|products]]. | ||
You can access all the products related to the current collection using ''collection.products''. | You can access all the products related to the current collection using ''collection.products''. | ||
Latest revision as of 19:08, 16 September 2008
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.