I’ve looked through the documentation and have tried lots of different variations of the ‘route’ but just can’t seem to get it to work. Am I going crazy or am I just doing something stupid to make it not work?
Well to be honest I’m not sure it works on regular pages. I tested it and it’s not returning any results. Might ask creator of the plugin if search works on something more than blog posts.
Looks like I have it partly working…however it’s only bringing back one result - the homepage.
I’ve set up taxonomies: [category,tag,page] in the site.yaml and then added
filters:
category: page
to the simplesearch.yaml file
Then I went into each page and added
taxonomy:
category: page
Seems that it’s picking up the homepage but nothing else. Perhaps I need to wait for the cache to empty? Although I have installed cachebuster and also deleted everything in cache manually.
Going to be a crazy busy day today but I’ll look at this when I get a free moment.
What would help immensely is if you could send me a link to zip dump if your entire site. That way I can replicate it and debug your content exactly. Can send me the link in a PM on Gitter.im if you like.
Ok - I think I have it working however there’s a few things that I’ve picked up in the process.
Search Facility
It seems that the search box is only searching page titles. If you search for something that’s within the content of a page this won’t be picked up. Is there a setting or config that can change this as the content really needs to be crawled and supplied in search pages.
Can’t re-search on search page
I’ve noticed that you can’t actually re-search when you’re on a search page. This happens with both the search box at the top of the site (in the deliver template) and also the larger search box in the content area. Not sure if this is a bug or done by design?
Menu doesn’t work on search page in mobile view
I’ve noticed that the hamburger menu doesn’t want to work in mobile view on the search page. This kind of leaves people stuck if they don’t get a page they want from a search query as they can’t re-search and can’t click on the menu…just click back or the logo to go to the homepage.
In future for bugs like this do you want them posted in the forum or would you prefer them to be added to the Git tracker thingy? (haven’t used that yet so will have to look into it
Most of those issues/questions can be resolved in the Deliver theme itself. Overrides for the simplesearch templates can be edited to provide the functionality you are looking for. I think Karol is on the case
I’m having a similar problem using the “multilang-site” skeleton, with no modifications other than the SimpleSearch partial added to the base.html.twig file. The pages for the multilang-site skeleton are all marked as “blog” in their taxonomies by default, but I’m getting 0 results on the search results page. I think I’m missing something?
These are linked to the latest develop branches in GitHub and not the actual released version. There has been a few updates that warrant a re-release of simplesearch plugin and learn2 theme.