Streaming live at 10am (PST)

Conditional Titles (or other elements that aren't CMS items)


#1

I’d like to make conditional titles (e.g. “Current Listings”) display when there are listings and to have it disappear when there are no listings.

Here’s an old request for this - Conditional Titles in CMS

Is there any further update to this? Is there a work around? The respondent in this thread indicated that it’s not a useful feature back in 2015, but I think that’s not quite right … I think it would be very useful


Here is my public share link: LINK
(how to access public share link)


#2

Hey,

Maybe this helps :slight_smile:

if you need more help just ask / send me a message and i could show you what is possible


#3

Hi!

Thanks for this , though I don’t it quite solves my problem (I’m happy to be corrected).

I’d like on a general page that has a collection list inside it to have a title outside of the list that’s conditional on there being at least one element inside it. It doesn’t look like that’s possible unfortunately…


#4

Hi,

I used it before but I had to use custom code.

So i made a simple test/ example for you maybe its usefull to you :wink:

https://preview.webflow.com/preview/colorcms?utm_source=colorcms&preview=25e17255a90b56a225f23e52cabca15e

here is the clone link


#5

Hey,
it should be possible without custom Code:

  • add collection list (additionally to the real list)
  • limit the amount of items to 1
  • add the Heading with a static Text

You don’t use any field of the collection in that list, only the static heading. The heading will now show if there is at least 1 item in that collection.


#6

Ye but i thought the question is to control a title that is outside of a collection list?


#7

You would use 2 collection list:

  • list 1: collection that i described, limited to 1 item, only holds a static heading
  • list 2: regular list

#8

ok but still the question is that he wants to use 1 list i think


#9

I understood he just wants the heading to be placed somewhere else than the regular list. That would be possible with my solution.

But yes, it comes with the cost of an extra list.


#10

I tried what you said works fine if you dont need the 20 lists on a page :),

But ye both ways work and if you don’t wanna code your technique is the best but its gonna cost you an extra list like you said :slight_smile:


#11

You are both gentlemen, thank you very much for your time on this. I’ve just implemented the non-code version of this as my coding skills are limited (it works great, thanks!).

However, I’ll have a look at the colorcms example with the high expectation my limited coding skill will improve remarkably :slight_smile: