Streaming live at 10am (PST)

Remove empty collection items from html

Hello community,

let’s say I’m having a collection with multiple collection fields and some of them are left empty. When I publish the website the empty fields still appear in the html code.

Is there a way to remove these empty fields completely from the html code?

Thanks in advance!
nvrdsch

Thank you sam-g for your answer. Unfortunately this doesn’t work for me.

In my example everythink is visually correct – the empty fields show no content on the published website. But when I look at the html code there is code regarding these empty fields.

And my question is if there is a way to not have them at all within the html code.

You could remove the elements with custom code but not sure the point. All the needless HTML was already loaded by the browser so there is really no benefit. Since this is how Webflow handles conditional visibility you get what they give you .

Ok. Thank you webdev.