I can find plenty of resources explaining conditional visibility online and in the university, but apparently that information is outdated. Where can I find conditional visibility now? I have a static element in the header symbol that I want to show only on specific pages… Can anyone tell me how I’m supposed to do that?
Welcome to the forum Mitch.
Conditional visibility can be applied to elements inside a collection list or on a collection template. Since you have not shared your project we can’t take a look.
So it can’t be applied to just a static element? I’m just running a simple test where I have a div inside a symbol which is placed on multiple pages. I want the div to only show on one page specifically
Sorry Mitch but I answered the question.
The documentation is pretty clear. Take a look.
Symbols don’t (currently) allow for style changes within specific instances, so as far as native solution need to either unlink your Symbol on the page you want to have the hidden div or create a separate Symbol with that div element removed/hidden.
An alternative solution is including some custom code on that page specifically to add
display: none to the div’s class. To make it easier I’d recommend using a combo class so you can still easily modify the styles of similar div elements with the same main class in the Symbol. This code can be added within an HTML Embed element, or within the Page Settings custom code, however the former will allow the changes to show within the Designer window as opposed to only on the published site