Shopify themes, liquid, logos, and UX
Hey guys,
I am trying to add breadcrumbs to my dawn theme but I would like to change a few things. I would like to show possibly Home - main category - product.
https://www.supplieswarehouse.co.uk/products/himalayan-4314-bounce-black-composite-safety-trainer
Currently this is what this is what it shows
This item is actually Home - Workwear & Safety - Safety Footwear. Can I change my breadcrumbs to match this?.
Current code is {% if template == 'product' %}
{% assign current_collection = product.collections.first %}
{% if current_collection %}
<nav class="breadcrumb" role="navigation" aria-label="breadcrumbs">
<a href="/" title="Home">Home</a>
<span aria-hidden="true">›</span>
<a href="{{ current_collection.url }}" title="{{ current_collection.title }}">{{ current_collection.title }}</a>
<span aria-hidden="true">›</span>
<span>{{ product.title }}</span>
</nav>
{% endif %}
{% endif %}
Also how do I make this look better in css?.
Thanks
Hi,
You can try this code.
{% if template == 'product' %}
{% assign current_collection = product.collections.first %}
{% if current_collection %}
<nav class="breadcrumb" role="navigation" aria-label="breadcrumbs">
<a href="/" title="Home">Home</a>
<span aria-hidden="true" style="display:inline-block;padding: 0 8px;">-</span>
<a href="{{ current_collection.url }}" title="{{ current_collection.title }}">{{ current_collection.title }}</a>
<span aria-hidden="true" style="display:inline-block;padding: 0 8px;">-</span>
<span>{{ product.title }}</span>
</nav>
{% endif %}
{% endif %}
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024