Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Search page with taxonomy filter

Started by Daniel Wrightson 7 years ago · 2 replies · 1118 views
7 years ago

I'm building a villa listing site and I have various pages listing 'types' of villas - or villas in a certain 'area' or of a certain 'size. That's all fine. What I can't seem to work out how to do is build a dynamic search page where clients can tick which 'area's they'd like, or the 'size', or the 'features'. Basically something like the Advanced Search panel at the right of this page. Is this built with Advanced Search plus added options?

7 years ago

Hi Dan,

If what you want is filtering a collection of pages with pré defined keywords. Then architecturing a taxonomy https://learn.getgrav.org/16/content/taxonomy based on your business then using the https://github.com/getgrav/grav-plugin-taxonomylist/ plugin should do the job.
If what you want to achieve is facet search, where your search engine's results are displayed alongside with matched taxonomy, there is nothing working out of the box as far as I know. I sort of managed to do that combining tntsearch plugin, adding the taxi in the custom fields, then filtering the results with some javascript.

7 years ago

Thanks - that's the conclusion I've come to as well. I've only just re-started coding after a 10 year pause so I'll warm up a little more before I have a crack at it. It seems to be something people would find useful...

Suggested topics

Topic Participants Replies Views Activity
Plugins · by DrPen, 2 days ago
2 81 3 hours ago
Plugins · by renedebaaij, 1 week ago
1 135 3 days ago
Plugins · by Thomas, 6 days ago
1 144 5 days ago
Plugins · by complanar, 4 weeks ago
6 471 3 weeks ago
Plugins · by BenLaKnet, 3 weeks ago
1 295 3 weeks ago