Jump to content

Is it possible to intercept / manipulate the pagination data before render?

Recommended Posts

Site URL: https://ableforall.com/faqs/category/How+it+Works

FYI - I contacted squarespace devs about this bug, but "there isn't any intention to change it, at least for the time being".

For our squarespace pages, such as this one: https://ableforall.com/faqs/category/How+it+Works

Upon going to this URL, it follows the new squarespace URL dynamic of /category/[name], instead of the old dynamic of ?category=[name], which is perfectly fine -- but the API for pagination.nextPageUrl and prevPageUrl returns the old format, which fails to work.  As such, hitting next from this page results in this URL: https://ableforall.com/faqs?offset=1479140525815&category=How+it+Works where the category is no longer selected.

Since Squarespace is unwilling to remedy this currently, I am looking for any info on intercepting the pagination call, or any call that contains one of the URLs pertaining to this kind of thing (such as the category link from a FAQ directly).  For the record, we are working with dev mode on, and we currently have overrides for once the page renders, but I was hoping to find a way to intercept the call before it renders and modify the response.

This is also broken from the FAQ itself when clicking on the category name.  The result is again the query string rather than the new schema for the URL.

Link to comment
  • Replies 1
  • Views 339
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

On 12/20/2021 at 11:28 PM, KosarinBNYM said:

Site URL: https://ableforall.com/faqs/category/How+it+Works

FYI - I contacted squarespace devs about this bug, but "there isn't any intention to change it, at least for the time being".

For our squarespace pages, such as this one: https://ableforall.com/faqs/category/How+it+Works

Upon going to this URL, it follows the new squarespace URL dynamic of /category/[name], instead of the old dynamic of ?category=[name], which is perfectly fine -- but the API for pagination.nextPageUrl and prevPageUrl returns the old format, which fails to work.  As such, hitting next from this page results in this URL: https://ableforall.com/faqs?offset=1479140525815&category=How+it+Works where the category is no longer selected.

Since Squarespace is unwilling to remedy this currently, I am looking for any info on intercepting the pagination call, or any call that contains one of the URLs pertaining to this kind of thing (such as the category link from a FAQ directly).  For the record, we are working with dev mode on, and we currently have overrides for once the page renders, but I was hoping to find a way to intercept the call before it renders and modify the response.

This is also broken from the FAQ itself when clicking on the category name.  The result is again the query string rather than the new schema for the URL.

When I checked the site with the 2 format they produce the same result

How it Works — FAQs — ABLE for All Savings Plan

FAQs — ABLE for All Savings Plan

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 No-code customisations for Squarespace (+100 Spark plugin customisations)
🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.