How to remove collapsible row section if there is no content

Hi!

I have been working with collapsible rows for my product pages, making FAQ dropdown rows for the most relevant products. I recently stumbled across this thread, helping me change the theme code so that rows with no contents will not appear.

So far, so good… Now, I would love to hear if you can help me a little bit further so that the entire section will disappear if there is not a single row with any content. I don’t feel like it is relevant with a FAQ dropdown for all of my products, and it looks a bit awkward when the section is just there without any Qs & As (see the attached file).

Thanks in advance!

All the best,
Jacob

Hi @Jacob_b ,

Can you share your store url

Yes, it’s https://nimoskin.dk/

The theme is Sense

Any solution for this, I also have the same requirement where if the dynamic content is not available then that collapsible component has to be hidden or removed

Dawn has this code for cases like this – if element is empty, it hides automatically.
You may try if similar code may help in your case.