How To

Add Pagination To URL

2min
there are times when it is beneficial to have the users selected pagination captured and stored as part of the url for example allow for consistent tracking of the selected page of results reusable 'landing page' links seo to accomplish this we will add in a custom override module that will intercept the outgoing query analyze the existing url string update the localstorage of selected page value apply the page offset to the outgoing query update the existing url string see custom overrides docid bc3gcthleeatoyujdtue for details on preparing for klevu js overriding template js override add the supporting module addpaginationtourl and apply it to the landing page override note the same addpaginationtourl module can be used on category pages by applying the override to the catnav scope as well full example javascript