Debut: where is the code for the Featured Collection section?

26 2 14

I can find code for every other section.  Why don't I see an entry for Featured Collection?  

I see this in collection.liquid:

{% schema %}
"name": {
"de": "Featured Kategorie",
"en": "Featured collection",
"es": "Colección destacada",
"fr": "Collection vedette",
"it": "Collezione in evidenza",
"ja": "特集コレクション",
"pt-BR": "Coleção em destaque"

but I don't see "featured collection" in theme.scss.liquid.  

Clearly missing something, probably obvious.  

Why do I want this?  If my Featured Collection is empty, I want nothing to appear on the page where the collection should be.  Right now it shows all the default empty collection stuff.  If I can insert a condition like {% unless collection.all_products_count > 0 %} at the start I can keep anything from being rendered, omitting everything.  Yes?


Ed K

Shopify Partner
2047 331 445

Hi @edk 

The file you're looking for is: collection-list.liquid

Let me know if that helps!

- Did we solve your issue? Like & Mark As Solution to help the community
- Should you need any direct help:
26 2 14

Thanks for the answer. 

OK, I can see where that will format and populate the Featured Products section.  But when I bracket the original code in an if:

{% if collection.all_products_count > 0 %}

<entire contents of collection-list.liquid>

{% endif %}

I still get the page rendered with an empty collection:


so, there is nothing being populated in the Featured Products section, but the section itself is still getting inserted and displayed with an empty collection.  I need to prevent the section from being inserted at all.  

If I inspect the page ( with Chrome, I see that the Featured Collection section begins here:

<div id="shopify-section-1596673354694" class="shopify-section index-section" == 0$

Is it the case that I need to somehow suppress or bypass whatever it is that places that on the page?  Where can I do that?  



26 2 14

I guess a better way to phrase this is:  the content of the Featured Collection section is dynamic, but the existence of the Featured Collection section on the front page is static.  

Can the front page rendering be dynamic?  Can I change the makeup of the front page based on a variable?  Because I think that's what I need.