Answers for "debut breadcrumbs shopify"

1

breadcrumbs shopify

{% 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">›</span>
    <span>{{ page.title }}</span>
  {% elsif template contains 'product' %}
    {% if collection.url %}
      <span aria-hidden="true">›</span>
      {{ collection.title | link_to: collection.url }}
    {% endif %}
    <span aria-hidden="true">›</span>
    <span>{{ product.title }}</span>
  {% elsif template contains 'collection' and collection.handle %}
    <span aria-hidden="true">›</span>
    {% if current_tags %}
      {% capture url %}/collections/{{ collection.handle }}{% endcapture %}
      {{ collection.title | link_to: url }}
      <span aria-hidden="true">›</span>
      <span>{{ current_tags | join: " + " }}</span>
    {% else %}
      <span>{{ collection.title }}</span>
    {% endif %}
  {% elsif template == 'blog' %}
    <span aria-hidden="true">›</span>
    {% if current_tags %}
      {{ blog.title | link_to: blog.url }}
      <span aria-hidden="true">›</span>
      <span>{{ current_tags | join: " + " }}</span>
    {% else %}
    <span>{{ blog.title }}</span>
    {% endif %}
  {% elsif template == 'article' %}
    <span aria-hidden="true">›</span>
    {{ blog.title | link_to: blog.url }}
    <span aria-hidden="true">›</span>
    <span>{{ article.title }}</span>
  {% else %}
   <span aria-hidden="true">›</span>
   <span>{{ page_title }}</span>
  {% endif %}
</nav>
{% endunless %}
Posted by: Guest on October-14-2020
0

debut breadcrumbs shopify

ADD THE CODE BELOW TO YOUR COLLECTIONS.LIQUID FILE, PERHAPS BELOW THE COLLECTION TITLE:

<!-- start breadcrumbs -->
<nav aria-label="Home" class="breadcrumb">
    <a class="Breadcrumbs" href="{{ routes.root_url }}">Home </a>
    {% if collection %}
	 / <a class="Breadcrumbs crumbCollection" href="/collections/{{ collection.title | handleize}}"> {{ collection.title }} </a> 
    {% endif %}
    {% if product %}
	 / <a class="Breadcrumbs crumbProduct" href="/collections/{{ product.type | handleize}}"> {{ product.type }} </a> /
	<span class="breadcrumb__link" aria-current="page" style="font-weight:bold;"> {{ product.title}}</span>
    {% endif %}
</nav>
<!-- end breadcrumbs -->
Posted by: Guest on September-14-2021

Browse Popular Code Answers by Language