Hi!
I want to add filtering options to my search component in the template, for example: show only book pages or show only magazine pages.
I guess that I need to affect this $results var somehow and I wonder what is the best practice for that.
This is my search controller:
<?php
return function ($site) {
$query = get('q');
$results = $site->index()->listed()->bettersearch($query);
return [
'query' => $query,
'results' => $results,
];
};
Is this an Ajax case?
Thanks in advance!