Difference between revisions of "Liquid Template Variables - related"
From Spiffy Stores Knowledge Base
m |
|||
Line 1: | Line 1: | ||
− | The | + | The Liquid template variable '''related''' has the following attributes: |
== <code>related.id</code> == | == <code>related.id</code> == |
Latest revision as of 11:44, 6 November 2013
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.