Hello to the Grav Community! I have been reading this forum for a while now and I must say that you are doing incredible job here.
Never the less I have some problems with SimpleSearch plug-in. Initial configuration was working fine but it only searched for blog category. When I added Self-Controlled Page configuration described in the docs and tried to search blog, only URI was changed but results page didn’t load. I have made var_dump in simplesearch.php
of $this->collection
after if ($query){ ... }
to check if search results are correct and they are correct but results are not presented on search result page.
Obviously I am missing something, so I am here to ask for help with configuration.
My current configuration is given bellow.
-user/config/plugins/simplesearch.yaml
enabled: true
built_in_css: true
built_in_js: true
display_button: true
min_query_length: 3
route:
search_content: rendered
template: simplesearch_results
filters:
filter_combinator: or
ignore_accented_characters: false
order:
by: date
dir: desc
-user/pages/02.blog/blog.md
title: Blog
menu: Blog
author: 'Blog Smith'
routes:
default: '/blog'
content:
items:
- '@self.children'
- '@taxonomy':
category: ['blog']
order:
by: date
dir: desc
limit: 10
pagination: true
simplesearch:
route: @self
filter:
- @self
filter_combinator: and
-user/pages/02.blog/article1/default.md
title: Article 1
author: 'John Author'
slug: article1
route:
default: '/blog/article1'
taxonomy:
tag: [tag1,tag2]
category: blog
author: 'John Author'
title: Article 1
I have tried various combinations that are posted in relevant topics but it didn’t work. My intention is to make few sites (similar to the blog site) that can use search for searching @self.children
content.
Thanks in advance for you responses.