-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-Controlled Page configuration doesn’t work: it always display results even before launching a search #197
Comments
I'm having the same issue, and it's also reported here: #51 (comment) |
I just ran into the same issue. This used to work in older versions of the plugin but does not now. In the past, when a template was set in the plugins settings, this would override the page template. At the moment, this works as follows:
So it will override the template whenever there is none set in the page header. Now I don't know enough about grav to be sure if this is a mistake in the plugin because the template can be set by the file name and would thus never be in the header or if the Regardless, this seems to be a bug. A quick fix for anyone who needs this functionality is manually setting the template in the page header. |
Hello all,
Hi thanks for the tips @butscharoni it works to display the normal page. I had to tweak some template files of my theme. Then, I removed the first line of the file : Finally, in the template of my page where I wanted the search bar, I just added this line : And of course, in the frontmatter of the page, I manually specified the template and added the field required for simplesearch self-controlled page mode :
I hope this is helping... |
Hi,
I have a simple blog page, where I have added a simplesearch header as described on the doc:
And now when I go on the blog page, I no longer have the list of my articles but the display of the results (which is empty because I did not launch a search).
I see in the debug bar that simpleearch_result is called:
info Routed to page /blog (type: simpleearch_results)
.If I understand what is written in the doc, it is the blog template that should be called instead, even if a search is launched from this page (and in this case the collection is replaced by the search results).
I’m using Grav v.1.7.7 and SimpleSearch v2.2.1 (with default settings)
Reproduced with grav skeleton onepage site
(problem reproduced at least by another person, see the forum thread here: https://discourse.getgrav.org/t/simplesearch-self-controlled-page-configuration-doesnt-work-it-always-display-results-even-before-launching-a-search/16408 )
The text was updated successfully, but these errors were encountered: