Conditional visibility based on Item number in a nested Collection List

I have a filtered Resources Collection List on another Collection’s Item Pages. It has a static “Resources” heading above it. I’d like to set conditional visibility for the Resources header so that the header only appears if there is at least 1 item in the Resources Collection List.

Using the visibility filtering settings while having either the Resources heading or its parent DIV selected, I can only choose a set/not set conditional for specific fields of the Page’s Collection. I can’t get at the nested Resources Collection, and even if I could I don’t think I could set visibility based on the number of items in the nested list.

Is this beyond the current capabilities of Webflow? Is there another way to achieve this?

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

Hey Peter, here’s how to drop in a project link so we can see your setup;

The specifics depends on whether you’ve built your CMS, i.e. whether you’re doing a single-ref from B->A, or a multiref from A->B.

In the latter situation, you can do a conditional filter on the multiref field itself as “is set”. If it’s null that evaluates to false; if it contains references, then true.

In the former situation, you need to use script. I usually check the visibility of the collection list, and the control other related aspects of the display accordingly.

Here’s a read only link to an Initiative Collection Page, on which there is a Resources List, above which is a Resources heading. There is currently no multi-reference field involved in this issue. What I am trying to achieve is having the Resources heading not appear if the filtering of the Resources list below it results in 0 Resource items showing. Conditional visibility settings available for the Resources heading only allow selection of field states of the Initiatives Collection, and these have nothing to do with whether or not the Resources List is showing 0 items because of the filters applied to the page. (Note I haven’t begun doing much styling yet as I am still working on structural issues.)

Yeah I needed to see how the references were set up, and what classes you’re using.
Here you go-

1 Like

Exactly the situation I have! Many thanks :+1:

Good to hear, Peter.
If that solved the problem for you, please mark it as the solution so others can find it too.