1
votes

I'm trying to fix the breadcrumb issue for a client, shopify doesnt support nested breadcrumbs for 'n' level collections OR breadcrumbs from a page to a collection.

What I need: Home > Page > Collection (Home > FoodDropPage > Food)

I don't really want to go the 'Hacky' tag products route as I think it puts some ownest on the users (Store owner) and I would prefer they not have to worry about it.

My current plan is to grab the active linklist, if it equals something, display its title link.

Is there a way to grab the ACTIVE linklist? I havent had much luck with the documentation and am not sure if this is possible.

If theres another solution, I would also welcome that.

Thanks!

1

1 Answers

2
votes

You can use:

{% for link in linklists.main-menu.links %}
{% if linklists[link.handle] == empty %}
  <li>
    <a href="{{ link.url }}" class="{% if link.active %} current{% endif %}">
      <span>{{ link.title }}</span></a>
  </li>
{% endfor %}