Showing the product path on product page - Dawn theme

Showing the product path on product page - Dawn theme

SC-APS
Visitor
1 0 0

Hi All, 

 

I'm building my Shopify store using the Dawn theme & I can't seem to get the product path to show on the product page so that customers can easily navigate back to the collection. I have followed advice from other posts but can't seem to get it working on my store. I have added the breadcrumbs snippet, but not sure how to get this snippet into to my theme.  

 

Any help would be appreciated!

 

Code so far - breadcrumbs.liquid

 

{% unless template == 'index' or template == 'cart' or template == 'list-collections' %}

<nav class="breadcrumb" role="navigation" aria-label="breadcrumbs">

<a href="/" title="Home">Home</a>

{% if template contains 'page' %}

<span aria-hidden="true">&rsaquo;</span>

<span>{{ page.title }}</span>

{% elsif template contains 'product' %}

{% if collection.url %}

<span aria-hidden="true">&rsaquo;</span>

{{ collection.title | link_to: collection.url }}

{% endif %}

<span aria-hidden="true">&rsaquo;</span>

<span>{{ product.title }}</span>

{% elsif template contains 'collection' and collection.handle %}

<span aria-hidden="true">&rsaquo;</span>

{% if current_tags %}

{% capture url %}/collections/{{ collection.handle }}{% endcapture %}

{{ collection.title | link_to: url }}

<span aria-hidden="true">&rsaquo;</span>

<span>{{ current_tags | join: " + " }}</span>

{% else %}

<span>{{ collection.title }}</span>

{% endif %}

{% elsif template == 'blog' %}

<span aria-hidden="true">&rsaquo;</span>

{% if current_tags %}

{{ blog.title | link_to: blog.url }}

<span aria-hidden="true">&rsaquo;</span>

<span>{{ current_tags | join: " + " }}</span>

{% else %}

<span>{{ blog.title }}</span>

{% endif %}

{% elsif template == 'article' %}

<span aria-hidden="true">&rsaquo;</span>

{{ blog.title | link_to: blog.url }}

<span aria-hidden="true">&rsaquo;</span>

<span>{{ article.title }}</span>

{% else %}

<span aria-hidden="true">&rsaquo;</span>

<span>{{ page_title }}</span>

{% endif %}

</nav>

{% endunless %}

Reply 1 (1)

sakinur-rahman
Shopify Partner
139 17 22

You may follow this tutorial. 

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications -

Your Coffee Tip and my code, A perfect blend. ❤️ Buy Me A Coffee


Website: HelloSakin.com