Filtering CMS by current page

Im on a detail page for a CMS collection - called locations.
Another CMS collection called Testimonials has a field called location.

I want to show only the testimonials that match the location of the current CMS detail page.

Im guessing I might need to show them all, and hide some with custom code… Or is there a way to do this? Thanks!!

Hey @EvanCowan,
If you have a reference field in your Testimonials that link to your Location collection. Within each testimonial you can select which location you want to attach it to.

Then from the Locations template when you add the CMS element link it to Testimonials. Open the options menu (Cog Icon) and go to filters.

The first dropdown you select Locations the second should auto complete to Equals and the third should be Current Locations.

After that you good to go, only the testimonials that you have linked to that location will show on that location page.

Hope it helps,
Ben

EDIT: I just did this up for someone else relating to a gallery CMS linking to a guests CMS. Same principles so heres a video example that explains.

1 Like

Try this:

-or- filter by current page:

This should be perfectly doable within our No Code Flow filter component. Every searchable item is a Webflow CMS item. Every visual aspect (including states) can be modified in the Webflow designer. We built it as a cloneable component with a little video tutorial to implement it – should take you around 10-15 minutes to get started.

:sparkles: A demo can be seen here → https://ncf-filter-styled.webflow.io/

Filter Vid

Thank you so much for the explanation!

I was struggling to understand how to connect to “current item”, wathing videos at Webflow but still nothing.

Thanks to your explanation I managed to do it! So grateful!

P.S. In case somebody more will read this post - make sure you use reference field, not options one. That was my mistake.