Solved

DAWN: Add path way/route of collection on product page

Nordiccomfort
Tourist
4 0 1

Hi, i am trying to show route/path way of collection so that the costumers can navigate the product in the collection.

 

Today i just do a "for" loop of collections to get a list of the collection the product is in. Like this:

 {% for collection in product.collections %}
                <li><a href="{{collection.url}}">{{collection.title}}</a></li> 
                {% endfor %}
                

This gives me: 

Skjermbilde 2024-01-20 kl. 01.42.32.png 


BUT WHAT I AM TRYING TO DO:

is to get it in this format: Collection 1 / Collection2 / Collection 3
Like this:
Skjermbilde 2024-01-20 kl. 01.42.59.png



Thank you in advance

the link to my page is 

www.nordiccomfort.no

Accepted Solution (1)

ThePrimeWeb
Shopify Partner
1808 510 383

This is an accepted solution.

Hey @Nordiccomfort,

You could use a span instead of li.

<span><a href="{{collection.url}}">{{collection.title}}</a></span> 

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website

View solution in original post

Replies 2 (2)

ThePrimeWeb
Shopify Partner
1808 510 383

This is an accepted solution.

Hey @Nordiccomfort,

You could use a span instead of li.

<span><a href="{{collection.url}}">{{collection.title}}</a></span> 

 

Was I helpful?

Buy me a coffee

🙂

Need help with your store? contact@theprimeweb.com or check out the website
USB0126
Visitor
1 0 0

can you advise where to add this code?