Shopify themes, liquid, logos, and UX
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
Hello, did you ever get this working?
can you try this
https://shopify.github.io/liquid-code-examples/example/breadcrumb-navigation
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
thanks for update
sorry Shoplift breadcrumb doesn't allow more customization tis standard code
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!
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?
sorry for that
Shopify work this standard code no more
https://shopify.github.io/liquid-code-examples/example/breadcrumb-navigation
Do you mean line 117? I find this code on line 29 and line 117. Do I change both? Or just 117?
I changed both codes and it worked for me!
Hi nice work, this seems to work so far, but I am wondering if you know as well, how this work with a sub-category in a main menu item. Because if you hover over an item of the main menu, it opens a dropdown with sub-categories and if you go to a page, it is showing:
home > product name, rather than home >collection (click/ or hover menu item) > product.
Hope you can assist/ help.
thanks.
Aseasy
Hi
You may follow this video to implement the breadcrumbs smoothly.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024