Within the product page, I would like to hide a certain element if the current product isn’t associated with any collection. Is there any way to check it with Liquid ?
Within the product page, I would like to hide a certain element if the current product isn’t associated with any collection. Is there any way to check it with Liquid ?
2
Answers
Or
The object product.collections is an array containing all collections where the product is listed.
So you may use this:
Documentation about arrays here:
https://shopify.dev/api/liquid/filters#size