Link
From Shopify Wiki
Syntax:
{{ link.title | link_to: link.url }}
In this example we output the link's description and link it (thanks to the link_to filter) to its url.
The liquid variable link has the following attributes:
Contents |
[edit]
link.title
Returns the description of this link
[edit]
link.url
Returns the url of this link
[edit]
link.object
Returns the object that the link points to (A collection, product, etc).
Some people use this feature successfully for creating overviews for related collections:
{% for link in linklists.gift-ideas.links %}
<div>
{{ link.object.products.first.image | product_image | link_to: link.object.url }} <br />
{{ link.title }}
</div>
{% endfor %}
[edit]
link.type
Returns the type of the object in link.object
