Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Simple Search, button & pagetitle

Started by Muut Archive 10 years ago · 0 replies · 536 views
10 years ago

I've 2 questions/problems with Simple Search

1) Is it possible to change the page title for the "simplesearch_results.html.twig" ?
I've included the search box with {% include 'partials/simplesearch_searchbox.html.twig' %} in my template and use zoekresultaat.html.twig which is in fact a copy of the default simplesearch_results.html.twig
The title for the page stays "Search results" which i want to change to the Dutch phrase "Zoekresultaat"
But because this is not a real page, i am unable to change this...

2) I've tried using a bootstrap template with an icon based search button form, like found on http://learn.getgrav.org/cookbook/plugin-recipes
---searchButton.on('click', function(event) {
if (input.val().length > 3) {
event.preventDefault();
window.location.href = input.data('search-input') + '{{ config.system.param_sep }}' + input.val();
}
});

TXT

is the essential part it hink...

I can only press enter to start a succesfull search.
When the button is pressed, all what happens is the previous used input is exte nded with an question mark (?) and used for the search function.

Where omes that question mark from ?
How can i make this function correct working with either the <Enter> or <button> ?&quest;

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1279 9 years ago
Archive · by Muut Archive, 9 years ago
2 886 9 years ago
Archive · by Muut Archive, 9 years ago
2 4015 9 years ago
Archive · by Muut Archive, 9 years ago
1 2891 9 years ago
Archive · by Muut Archive, 9 years ago
3 1075 9 years ago