Skip to content

Instantly share code, notes, and snippets.

@andreibabor
Last active November 21, 2017 16:35
Show Gist options
  • Save andreibabor/aefb13ca051298d59ed0fd05b360697e to your computer and use it in GitHub Desktop.
Save andreibabor/aefb13ca051298d59ed0fd05b360697e to your computer and use it in GitHub Desktop.
Shopify 3 Multi-levels Menu
<ul>
{% for link in linklists.women.links %}
{% assign child_list_handle = link.title | handle %}
{% if linklists[child_list_handle] and linklists[child_list_handle].links.size > 0 %}
<li class="has-dropdown">
{{ link.title | link_to: link.url }}
<ul>
{% for child_link in linklists[child_list_handle].links %}
{% assign grand_child_list_handle = child_link.title | handle %}
{% if linklists[grand_child_list_handle] and linklists[grand_child_list_handle].links.size > 0 %}
<li class="has-dropdown">
{{ child_link.title | link_to: child_link.url }}
<ul>
{% for grand_child_link in linklists[grand_child_list_handle].links %}
<li>
{{ grand_child_link.title | link_to: grand_child_link.url }}
</li>
{% endfor %}
</ul>
</li>
{% else %}
<li>
{{ child_link.title | link_to: child_link.url }}
</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% else %}
<li>
{{ link.title | link_to: link.url }}
</li>
{% endif %}
{% endfor %}
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment