Hi all,
We make a query to the DB based on a query parameter in the url e.g. ?category=name_here.
What we want to do is change the page URL each time we paginate to the next or previous result (as we how one result per page).
E.g. on page load (and server connect) we load the first result, I then want the page url to convert from example.com/items?category=name_here to example.com/item/item1?category=name_here.
Then when I click next I want example.com/item/item2?category=name_here and so on.
This is so that if a user just loads example.com/item/item2 it will load that single item. But, if they are viewing via a category, they can paginate through them, and the url changes each time.
Any ideas on the smartest approach to achieve this?
I’m successfully paginating, but without URL path changing.
Thanks!