Shopify themes, liquid, logos, and UX
Hi all,
In a previous version of Dawn theme, I had edited the card-product.liquid file to include the collection name in the url of the product. So for example: mysite.com/collectionname/productname instead of just mysite.com/products/productname. This was working great for displaying my popup forms on only some products from collections, etc.
The code I had changed in card-product.liquid was line 108:
{{ card_product.url }}
To:
{{ card_product.url | within: collection }}
This worked beautifully to add in the collection name to the url of the product.
However, I've just upgraded to Dawn 10.0, made this same change to the file, but it doesn't work the same.
Any tips? Would the code need to be different?
Thanks in advance!
you need to add object in card render in collection file.
Then you can use that collection object. for example here.
Hope this helps.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025