Skip to content

Instantly share code, notes, and snippets.

@kellyvaughn
Created October 13, 2015 20:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kellyvaughn/51e78de7b1ebf639d5fe to your computer and use it in GitHub Desktop.
Save kellyvaughn/51e78de7b1ebf639d5fe to your computer and use it in GitHub Desktop.
Shopify Product Breadcrumb (Home > Category > Subcategory > Product)
<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: " + " | replace: 'custom', 'Custom Built by Midwestern Craftsman' | replace: 'chalk/clay paint', 'Junk Gypsy™ Chalk/Clay Paint' | replace: "Milk Paint", "Miss Mustard Seed's Milk Paint" }}</span>
{% else %}
<span>{{ collection.title }}</span>
{% endif %}
<span aria-hidden="true">&rsaquo;</span>
{% for tag in collection.tags %}
{% if product.tags contains tag %}
<span>{{ tag | uppercase }}</span>
{% endif %}
{% endfor %}
<span aria-hidden="true">&rsaquo;</span>
<span>{{ product.title }}</span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment