I’m wondering if anyone is able to help me / point me in the right direction.
Currently, I have my site set up so that AJAX loads in resources based on the filters etc.
I would like to create something similar to this https://www.dexters.co.uk/property-sales/houses-for-sale-in-hampstead, notice how when you search by location or and of the filters the URL changes rather than using post or get to get a response.
I really don’t know where to begin on this. I feel like its really straight forward but I don’t know what to read up on.
Any help would be greatly appreciated.
Extras (like Tagger for example) usually run a plugin on the event OnPageNotFound for this kind of functionality.
Maybe you can also use the extra CustomRequest.
Thank you for the quick response!
I did come across this plugin in my search but wasn’t clear if this was what I needed.
Do you have any experience from this extension?
Maybe CustomRequest is not what you need. It depends on your requirements.
If you want a solution like the one on the page you linked with URLs like these
then you probably have to write a custom plugin to extract the relevant information (number of rooms, houses or flats, for sale or for rent, location) from the URL and route to the correct resource (
I think with CustomRequest you could handle URLs like these.
Maybe the former URLs work too, if you use a a regular expression.
Thank you this is super helpful. I’m going to try now and see how it goes!
It looks to me like this page doesn’t act very differently than a POST. The whole page reloads after each filter change. It’s nice to have a URL that can be distributed, but if you’re using AJAX to avoid page reloads, then a regular URL won’t work optimally. See this page on one of my sites:
Thank you for your reply.
The customRequest extra, at the moment, seems to be the functionality I’m going for.
I’m currently retrieving the path, I’m just currently now writing a snippet to process the path into a search object.
Thank you for pointing me in the right direction.
No, that doesn’t work.
You can make it work.
Use the values from the URL in the initial response and then reload the data with AJAX when the filter changes and update the URL in the browser (