{% assign breadcrumb_items = '' %} {% capture home_item %} { "@type": "ListItem", "position": 1, "name": "Home", "item": {{ shop.url | json }} } {% endcapture %} {% assign breadcrumb_items = breadcrumb_items | append: home_item %} {% if collection %} {% capture collection_item %} ,{ "@type": "ListItem", "position": 2, "name": {{ collection.title | escape | json }}, "item": {{ shop.url | append: collection.url | json }} } {% endcapture %} {% assign breadcrumb_items = breadcrumb_items | append: collection_item %} {% endif %} {% if product %} {% capture product_item %} ,{ "@type": "ListItem", "position": {% if collection %}3{% else %}2{% endif %}, "name": {{ product.title | escape | json }}, "item": {{ shop.url | append: product.url | json }} } {% endcapture %} {% assign breadcrumb_items = breadcrumb_items | append: product_item %} {% endif %}
Skip to content