Re: linklists[block.settings.linklist] what happends there?

linklists[block.settings.linklist] what happends there?

thalpie
Visitor
2 0 0

Ive just started developing in liquid and ive seen this iteration through a link list

{% assign linklist = linklists[block.settings.linklist] %}
{% for i in (0..linklist.links.size) %}
<li><a href="{{ linklist.links[i].url }}" >{{ linklist.links[i].title }}</a></li>
{% endfor %}

{% endif %}

my question here is what does linklists[] do to the block.settings.linklist object ?

Reply 1 (1)

Slava_Maksimov
Shopify Partner
35 5 12

linklists takes the navigation menu handle and returns the linklist object

Theme and app development