Difference between revisions of "Liquid Template Variables - related"
From Spiffy Stores Knowledge Base
(New page: The liquid template variable ''related'' has the following attributes: == <code>related.id</code> == A related collection always returns 0 because it is a pseudo collection. == <code>re...) |
(No difference)
|
Revision as of 17:25, 16 September 2008
The liquid template variable related has the following attributes:
Contents
A related collection always returns 0 because it is a pseudo collection.
This is the related collection handle. related is always returned.
Returns the title of the related collection. This consists of the product's title followed by - Related Products.
There is no description for a related collection.
Returns a collection of all products that are related by tag matching to the current product. The list of products takes pagination into account.
You can access each product using a for iteration.
{% for product in related.products %} {{ product.title }} {% endfor %}
Returns the number of related products.
Returns a collection of all products that are related to this product. There are a maximum of 22 related products.
The is the relative URL address of the related collection.