How to create Nested Breadcrumbs (subcollections) using custom metafields

Steven_Chu
Shopify Expert
12 0 3

I took the idea from this thread (https://ecommerce.shopify.com/c/shopify-discussion/t/supply-theme-breadcrumbs-for-sub-collections-or...) , and implemented it using the Shopify FD browser plugin for CUSTOM FIELDS.

Here's my code i added right before the collection tag in my breadcrumbs.liquid

{% if collection.metafields.c_f['[c]parent-handle'] %}
          {% capture url %}/collections/{{ collection.metafields.c_f['[c]parent-handle'] }}{% endcapture %}
  			{{ collection.metafields.c_f['[c]parent-handle'] | link_to: url }} 
          <span aria-hidden="true">&rsaquo;</span>
        {% endif %}

Attaching screenshots of code locations, and final result:

Stores I built: Flora1761.com (highly art-directed Nail Lacquer boutique) / Marissa-Webb.com (NYC SoHo Fashion Brand) / ViraniJewelers.com (high-volume product jewelry website) / Chuubie.com (my personal testing ground, using Shopify CMS as a stock photography sales platform)
0 Likes
Saji
Tourist
8 0 0

Hi Steve, 

I am looking a breadcrumb solution which has - Home > Page > Collection > Product or rather collection pointing to pages since In my Implementation the pages hold a list of collection.

I have placed the code you mentioned and also installed Shopify FD. Could let me know how I could proceed from here. I mean where to start with.

Thanks

John

 

0 Likes