Dawn theme - adding breadcrumbs

kriszti
Shopify Partner
59 0 7

Help!

I'm implementing simple breadcrumbs and the Dawn theme won't return the path to the Collection.  {% if collection %} is being ignored.  I traced the requested path. See the preview below and use Best Sellers to find Product 5

{% if template contains "product" %}

{% if collection %}


<span class="breadcrumbs__separator">/</span>
<a href="{{ collection.url }}" class="breadcrumbs__link">{{ collection.title | escape }}</a>



Here is the Preview link. The path it returns is /products/product-5, when it should be /best-sellers/product-5

https://izgw13130ug4fvgm-59322171565.shopifypreview.com

Replies 9 (9)
ebon
Pathfinder
108 3 38

Hello, did you ever get this working?

KetanKumar
Shopify Partner
32500 3268 10837

@ebon 

can you try this 

https://shopify.github.io/liquid-code-examples/example/breadcrumb-navigation

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
ebon
Pathfinder
108 3 38

Thanks for the link. I tried it and it didn't exactly they way I hoped.

The breadcrumb would only display home/the product title 

It wouldn't display the product category ie. home/headwear/trucker/item

 

 

KetanKumar
Shopify Partner
32500 3268 10837

@ebon 

thanks for update

sorry Shoplift breadcrumb doesn't allow more customization tis standard code 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
iamheathen
New Member
1 0 1

I found this tip with help of Shopify Support:

In the snippets directory open the product-card.liquid snipped and on line 17 change

{{ product_card_product.url | default: '#' }}

to

{{ product_card_product.url | within: collection | default: '#' }}

That will end up making sure that when you go from a collection to a product by clicking on the product card it includes the collection info in the url.

Thanks to this https://www.reddit.com/r/shopify/comments/paucip/tearing_my_hair_out_dawn_theme/ha7jfrs/

Worked on mine!
Good luck!

fred31
Tourist
3 0 1

how about showing a breadcrumb for when someone comes direct to the prodcut via say google ads? how do we show maybe one of the collection the prodcut is tied to?

KetanKumar
Shopify Partner
32500 3268 10837

@fred31 

sorry for that 

Shopify work this standard code no more 

https://shopify.github.io/liquid-code-examples/example/breadcrumb-navigation

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
TealDreams
Tourist
8 0 4

Do you mean line 117? I find this code on line 29 and line 117. Do I change both? Or just 117?

HDB2021
Tourist
6 0 0

I changed both codes and it worked for me!