Hiding inactive CMS items from source code

Hi community,

I am administering our company’s open positions via webflow CMS, so I can easily switch between open and filled positions.

Site can be accessed here: Artificial Intelligence and Machine Learning Jobs at enliteAI
How do I get rid of the hidden items in the source code? view-source:https://www.enlite.ai/career

You could use JavaScript to remove elements from the DOM on page load but the reality is you can’t exclude them from the source with Webflow. Some day we may have template logic that allows it but that day has not arrived.

You could add a switch to your CMS-items that you can switch between active and not active (or open / filled positions).

active

Then you add a filter to the CMS collection to only show open positions.

filter

:slight_smile:

Fantastic, that did the trick! I don’t know why I’ve used conditional visibility instead of the filter in the first place… Thanks a bunch Robin!

Better to not have it in the source to begin with! Good share.

1 Like