Wondering about all the search functions’ options and:
I merged search with the filter by tag function on the same page. It works, only that if I first click on a tag, which brings me to a page with this kind of url
site.dev/tags:example
and then I enter a search query, the url is updated to
site.dev/tags:example?q=test
which makes it impossible to get a proper result.
If I invert the action’s order, so first I search for something and then I filter the content by clicking on a tag, when I click on a tag the url is built from a clean base-url.
Is there a way to clear the url also for every new search query? Not only the part after =, but the full thing?
?q=eeaa
Or, alternative approach, would you suggest to:
keep a template only for tag-filtering, with a searchbar to insert a new query
but when click enter for the search to happen, the button brings to a different template only used for search purposes? Using maybe a route?
Curious to hear which kind of approach you would take!
You are right, the filter function works perfectly when populated with enough, varied, content to search through.
Still, is there a way to reset the url to its basic root value, whenever searching through a query?
I like the options to refine a search function by using both the searchbar and tags, but I might as well try to test how it feels when using either one or the other at any time.
I suspect that currently your form has no action attribute, so the action URL defaults to the current URL, and only the query string (the part after ?) is modified.