Conditional Visibility if content is not present?

I’ve got my CMS/case study page layout setup but when I am not filling a section in the negative space remains - how do I fix this to only show content blocks if I am using them?

E.G Tiger Lily Herbs

*all the negative space towards bottom of page

Hi Rachel, can you share your readonly project link?

hi! @memetican sure thing Webflow - Rachel's NEW SITE 2023

Using Tiger Lily as an example, that blank area you’re seeing is your Content block 05.
Currently in that CMS item you don’t have those fields populated so you have image elements with no images to fill them with.

If you will not always have all 5 of your content blocks populated with content, what you can do is add some switch fields to your CMS, e.g. Content Block 01, Content Block 02, and make them all on/off items.

Then in Tiger lily they’d be on for 1-4, and off for 5. Use the appropriate switch field in each content block’s conditional visibility settings, so that you can make the entire Content block 05 div disappear when you want it to.

@memetican added a screenshot to the switch I’ve added but as of right now it doesn’t really relate to each individual item under the content blocks and it hides block five by saying it’s visible when content is on but the same applied to block 4 hides it too when there is content there?

definitely missing something in the infrastructure here?:sweat_smile:

You’ve lost me :laughing:

If your content is conditional for each of your 5 “blocks”, then;

  • Create 5 switch fields in the CMS, one for each block.
  • Set them to on/off depending on which of the 5 you want to show for each item
  • In your layout, set the conditional visibility of each of the 5 blocks to the corresponding switch field

@memetican aahhh I gotcha so I just need to add a switch below each each content block list of items in the CMS - it works!! thank you!

1 Like