Forum

Thread tagged as: Question, Runway

Is there a way to filter a collection on the front end?

We have currently got a meet the team gallery which, as it stands, shows everyone's image and links to their profile (currently all 62 of them).

I've been asked to add filters so that visitors to the website can 'narrow down' the number of people displayed to only show those from the selected office(s) and/or from the selected department(s). In the same way you can do on an online shop when you filter down by size, colour, brand etc.

The profiles are generated through a collection and use <perch:related /> to set each person's office location and department.

I was just wondering if there is a dynamic way of doing this rather than creating a page/filter for each option - We have 9 offices and 8 departments so if I can avoid creating 72 pages that would be great!

Many thanks, I hope that made sense?

Glen

Glen Piggott

Glen Piggott 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you can use filter just as you would with perch_content_custom().

Yes, you can easily use the filter and then turn that according to what you wanted! Thanks and Regards, [url=https://pandahelper.me/]panda helper[/url] [url=https://emu4ios.biz/]emu4ios[/url] [url=https://getgbwhatsapp.biz/]gbwhatsapp[/url]