I m setting up algolia search plugin on a 2.4.1 kirby site and having a few problems I can't figure out.
Following the process on the plugin repo and with this help on the forum I could :
connect my kirby install to my index in Algolia in site/config.php with
retrieve content from my site and feed my index in algolia with :
c::set('algolia.fields', array('url', 'intendedTemplate', 'title', 'text'));
run a first import placing in my footer, once :
<?php algolia()->index(); ?>
Add a controller for algolia to run with the search query in site/controllers/search.php
Add the suggestsed hanges in site/templates/search.php to have the form and list results from algolia.
But I have an error on my form when I visit /search on my site. On
<input type="search" name="q" value="<?php echo esc($results->query()) ?>">
Call to a member function query() on array
When I force the search query with /search?q=xxx un the URL it's working well... I have the results with the pagination.
- Does anyone have a clue how I can solve that ?
Thanks in advance