Set conditional visibility in components based on CMS field state

Within unlinked components we can set conditional visibility based on whether a specific CMS field "is set." With components we only have conditional visibility based on "toggle" fields. I'd like to set an icon button to appear only if a specific link "is set" and hide if not set.

  • Patrick Foley
  • Nov 29 2023
  • Lukas Graf commented
    09 Dec 20:53

    Yeah I don't understand why there is a difference between conditional visibility and visibility and user access in the first place ... Please allow us to add conditional visibility as a component prop! (or enhance the "visibility and user access" thing to support conditional visibility)

  • Stof Hofer commented
    30 Sep 13:36

    And here I need to come back again. Why is this even inconsistent to begin with? Please unlock the potential power of components.

  • Sanavita AG commented
    13 Aug 14:19

    And it doesn't work for dropdowns as well, unfortunately.

  • Sanavita AG commented
    13 Aug 14:16

    And the worst thing is, you can't even invert a toggle!

    For example: If I want an element to be HIDDEN instead of visible, when a toggle is set to true – not possible. Really annoying because it seems like such a small thing. Now I have to make to switches in the cms collection which makes the UX worse for the end user.

  • Sanavita AG commented
    13 Aug 14:12

    YES! Why not bring the power of conditional visibility over to the component properties??!

    It's literally so simple: make the same settings for conditional visibility available at "normal visibility" for components.

  • Giuseppe Legrottaglie commented
    22 May 17:29

    This is very crucial. For example, I have a 'New' tag that appears on the blog post card for up to 15 days from the publication date, but I can't use components because the conditional visibility is locked for toggles.

  • Jon Way commented
    10 Feb 15:55

    I'm fairly amazed this hasn't shipped– it seems like it would be low effort and high return. With a site that has a lot of CMS content and uses collection lists with a large amount of conditional visibilities to display it, not having this is really curtailing the actual power of using components.

    An easy example is with product tiles. I can't use components if I want to have something like a 'new' tag for recent products published in the last 14 days. There's a lot more use cases, but something as simple as that is preventing me from using components in a meaningful way and I still have to update every instance of product tiles.

  • Stof Hofer commented
    December 17, 2023 15:46

    I would love to see this