Configure the Hide/Show a DIV element?

Hi Folks,

I have a top bar notification that the client wants to be able to control and turn off/on using the CMS editor. I gave tried playing around with switches and conditional visibility to get this working, but had to joy. Is this even possible to do in Webflow CMS and if so how would I go about it?


Here is my public share link:

https://preview.webflow.com/preview/agrikids-2-0?utm_medium=preview_link&utm_source=designer&utm_content=agrikids-2-0&preview=512c891b4197d2897ab0f185dc25fe9e&mode=preview

@Bammedia

Hey,

I am not sure if I am fully understanding this, but if you want the visibility control inside the CMS editor the best thing would be to make “a hidden variable”.

To do this, I like to create a text block field named “Visibility” (or whatever you want) and inside the text of the item put “true” or “false”

In the CMS item itself this is where you want to change true/false:

image

after add your condition on the item wrapper or what ever you would like hidden.

image

The below example shows the grids are hidden if they are false. I could have placed it on the wrapper if I wanted to completely remove the item, however, for this example I wanted to keep the event titles.

After you have done this, you can go back into the CMS item, and change the condition to … technically anything but true for it to disappear.

Hey, thanks for your assistance. I was already half-way there with the on/off switch. It just needed it to be in the CMS and using the ‘empty state’ as the effective hidden element. Working now, thanks.

1 Like