{{ product.url | within: collection }} … trying to remove the within: collection element to correct a canonical issue.
Looking in the “collection-template.liquid” file; it’s the one I’m trying to edit.
What if I don’t have any reference to {{ product.url | within: collection }} within the collection-template.liquid file?
The line of code above indicates, for products found ‘within’ any collection use the collection name in the URL.
AHA … Just found
in the product-template.liquid file.Should I still remove the within: collection element?
I want to override the code so that our product URL shows up in internal links across the site, regardless of the collections it can be found in. Remember, this product URL is the designated canonical, so it should be the version linked to throughout the site.