Conditional visibilty ><=

Hi everyone!!

I’d like to ask a question concerning the Conditional visibility.
I set up two different CTAs (Read more and Read Less) so that I can expand or collapse a paragraph but there are some paragraphs in the collection list that are less long than the minimum I indicated but I still see the “Read more” button even if there’s nothing to read more.

I would like to try insering this logic: the “class-name-of-the-button” is visible if “the-paragraph-class-name” > 16ch

How can I implement this logic so that the Read more button is not going to be visibile for the shorter paragraphs??

Thanks in advance! P&L <3


Here is my public share link: Webflow - Gutenberg al Colosseo

You have to make it in Javascript not with conditional visibility. Conditional visibility is only to hide something based on CMS conditions

Hey Riccardo, in your case, the easiest way will be to manually set this option in the CMS. You’d add a true/false switch, labeled “Read More?”. And you’d use that with conditional visibility to design the short-form and long-form variants of your UI.

1 Like