Streaming live at 10am (PST)

Need conditional dropdown

It doesn’t appear to be possible to use the attributes of a referenced collection item in a template for conditional visibility. Is this possible?

For example, I want to hide a section based on the type of template that was selected. I have a collection “Templates” which contains sections for that template. I have another collection called “Offers” which I am setting the Template in that collection. I’d like to hide certain elements on the offers page based on the attributes in the template.

Is that possible? Or could it be added?


I think you can. Could you share your read-only link?

You can basically hide and show anything based on an option field explicitly defined in the CMS. For instance if you have an article that has 3 sections, and you need to hide the second section, all you would need to do is add an option field in the CMS with two values, YES and NO.

Then you would call your JS/Jquery on document.ready() to remove the closest parent (section) based on the type of text in the YES/NO CMS field. Not the cleanest way of doing it but at least the resources don’t get fully loaded

Here is a fiddle;

1 Like

I’m not able to select the “template” data for conditional visibility. I need to hide/show certain div elements based on which template option is selected. I want to match based on a string match.

Any thoughts @vincent?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.