Hey everyone,
I’m struggling with something, and maybe I’m just overthinking after spending so much time on it haha, but here is the situation:
I have a list of brands
Each brand has a list of products
Their is a filter by default to show only products for kids.
So there is the first RG for the brands and another RG inside it for the products (nested RG)
*Brand 1
**Product 1
**Product 2
*Brand2
**Product 1
**Product 2
*Brand 3
**Product 1
**Product 2
When there is no product for a brand, the corresponding brand RGs are hidden.
I want to show a message outside of those RGs, at the very top, saying something like “there is no products available” when none of these Brands have a product and hide everything.
I know how to do this inside the nested RG as it’s easy to count the number of products, but I don’t want to show every RG with this message inside it.
I tried to add a condition like this but it’s not working because it doesn’t count only the filtered results visible, but all the products from all the brands: repeatingGroup All Brands’s List of Brands:each item’s Product:count is 0
So if the page only shows 2 brands with 2 products each because the default filter only allows to show the products for kids, it counts all the products so the result is way more than 4.
I tried to use Repeating Group Tools but I can’t make it work for my use case.
Any idea how i could achieve this?
Thanks!