Collection.title not returning a value

{{ delimiter }}
{{ collection.title | link_to: collection.url }}
{{ delimiter }}
{{ product.title }}

This is an excerpt from my breadcrumbs.liquid to display my breadcrumbs. {{ delimiter }} displays the cheveron symbol “>”. My issue is that the collection title is not displaying anything, just empty space. Any idea why that is? The product is included in a collection so there should be one.

Hi @siegfredalcover ,

This is only visible when the product link includes a collection. Refer: https://www.bareoutdoors.com.au/collections/hanging-egg-chairs/products/outdoor-hanging-ball-chair-black-black

When the link includes link collection, it will display fine: ‘/collections/hanging-egg-chairs’

If you want to achieve this, you need to change the code in the product item:

{{ product.url }}

=>

{{ product.url | within: collection }}

Hope it helps!