The linklist object

The linklist object has the following attributes:

Returns the handle of the linklist.

Returns the number of nested levels that a linklist contains.

For example, given the following main menu structure:

Main Menu
  └ Home
  └ About Us
    └ Locations
      └ Montreal
      └ Ottawa
The following Liquid code:
{% assign menu = linklists.main-menu %}
{{ menu.title }}: {{ menu.levels }}
produces the following output (edited for space):
Main Menu: 3
## linklist.links

Returns an array of links in the linklist.


{% for link in linklists.main-menu.links %}
      <a href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}


<a href="/">Home</a>
<a href="/collections/all">Catalog</a>
<a href="/blogs/news">Blog</a>
<a href="/pages/about-us">About Us</a>

Returns the title of the linklist.

Ready to start selling with Shopify?

Try it free