Hey guys, I'm looking to add some code functionality to my buttons on pages, that will allow me to easily create Next/Previous buttons. My thinking is essentially, that say if the Next button is clicked, it takes the current page URL (which would be something like "sitename.com/page/3") and add one to the number on the end, taking you to "sitename.com/page/4", and of course, subtract for going to the Previous page (on the first page, there wouldn't be a Previous button, and on the final page, there wouldn't be a Next).
I used to program websites by hand with HTML, CSS, Java and PhP back in highschool, but that was quite a while ago for me so while I should be able to understand the basics of what I need to do, I don't know how to do it in Squarespace's environment.
Thanks for any help!