1

We are extending the Location Filter rendering with distance and services dropdowns. On the search button click we need to append the distance and services filtering values to url as hash parameters. What's the best approach to perform this change Or are there any other options that we can consider achieve this ?

  • Try this.There should be searchbox js where your search query url is getting created. – Hussain Jul 31 at 4:16
0

You can use the existing function of XA.component.search.query (defined in component-search-query.js). For example:

var hash = {};
hash["key"] = "value";
XA.component.search.query.updateHash(hash);

Keep in mind that each of the search components supports search results signatures (you can assign some of the filters to one Search Results rendering and others to second Search Results on the same page). If you want to support this you need to include the signature in hash parameters. This is done in all of the scripts so you have plenty of examples how to do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.