Hi. My collection items can either have an image or youtube content. But i would like the page design to look different for when it has an image. How can I do this.
Here is my site Read-Only: LINK
(how to share your site Read-Only link)
Hi. My collection items can either have an image or youtube content. But i would like the page design to look different for when it has an image. How can I do this.
Here is my site Read-Only: LINK
(how to share your site Read-Only link)
Conditional visibility is the easiest way.
Another way is to create a component for each variant of the page, and then in the CMS, a boolean switch field as to which to show. You can then expose a Visibility property in each component, and bind each to a different field.
The setup complexity is roughly the same but you have the advantage that with components, the suppressed components will be fully suppressed server-side and have no HTML hidden in the page. Tradeoff is you need multiple switch fields in the CMS, one per variant, and you have to remember to set them right.