I’m building (what will be for me) the most ambitious search functionality I’ve attempted. This would involve a text field that initially returns a set of pages, then those pages can be filtered using multiple different form elements (radio buttons, checkboxes, select fields, etc…). I’ve seen this topic covered a few times in the forum, but I’d really like to understand it from my own point of view and build it myself from scratch. Here’s how I think it would work:
- Build a simple search that returns a set of pages (eg. https://getkirby.com/docs/cookbook/content/search)
- Results page includes form elements that update the URL with different parameters using JS and reloads the page using AJAX (content representation with JSON)
- Results page controller checks for different parameters and filters results accordingly (eg. https://getkirby.com/docs/cookbook/content/filtering-with-tags)
Is my logic correct, or is my thinking completely wrong?