Streaming live at 10am (PST)

Filtering CMS by current page


#1

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!!


#2

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.


#3

Try this:

-or- filter by current page: