How to determine if a product is part of a hidden collection in Shopify liquid templates?

Paul Spencer

is it possible to programmatically (in liquid templates) access the products contained in a hidden collection? Or to find out if a particular product is in a hidden collection? My attempts so far indicate that a collection that is hidden is not accessible via the collections global variable and I don't see another mechanism to do this.

David Lazar

I think you're right. If a collection is hidden, you're SOL. Kinda makes sense. If it's hidden, yet accessible, it's not really hidden. Imagine the outrage generated if a hidden collection was visible on a shop. People would circle the wagons for a burning...

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Displaying the current collection on a product info page (shopify liquid)

How does Shopify make their liquid templates safe (avoid XSS)?

Product price calculations in Shopify Liquid

How to get particular product image in shopify liquid file?

How to interpolate in liquid shopify

Access JSON lumps in metafields with Shopify Liquid templates

Using vue.js in Shopify liquid templates

Shopify liquid product.thumbnail.liquid repeats block even there is no loops

Shopify liquid - collection object is empty in theme.liquid

How to print pattern in liquid shopify

How to add "you added this" bellow the product in the collection SHOPIFY

How to style text product-template.liquid and put an oval around depending on text length Shopify

Shopify / Liquid - nested collection shown in URL - collection within a collection

How to bundle product in shopify?

Shopify / Liquid - inserting product recommendations onto cart page

Access image metafield inside product.liquid in Shopify

Hide specific product in Shopify with Liquid based on customer tags

{{ product.metafields.myfields.myfield.updated_at }} | Shopify Liquid | Metafields

How to add all the shopify filters to standard liquid

How to write ruby function inside shopify liquid?

How to add image attributes on .liquid (shopify)

Chose which (shopify) collection to loop through with schema in liquid?

On Shopify, check if a given product is not on any collection

Shopify: how to access a Shopify metafield using JavaScript in a .liquid file?

How to get the URL for any product in Shopify Shop given that its pattern varies if it belongs to a collection?

Shopify - How can I match the display order of tags to product display order in a collection?

How to update product options in product variant in Shopify?

How to assign a hashmap to a variable in Liquid Templates?

How to target multiple templates in liquid unless statement