Add Child Collection Title Above Product Title

DavvaM
New Member
1 0 0

Hi

I am trying to display collection titles above product titles in my template.

I only want the Collection title that the product is from so ideally the collections child collection

E.G. Bags > Cartridge Bags (I would like to just show this collection title)

I added the following to my template file but it just outputs all of the collections.

{% for collection in product.collections %}
  {{ collection.title }}
{% endfor %}

Any help would be really appreciated.

Thanks

0 Likes