I have a large collection of sub-pages, paginated to 10 items per page. On the sub-page template, I have prev/next links so you can browse each item without going back to the parent page. I also have a “view all” button which takes you back to the parent page, listing all the sub-pages.
Problem I’d like to solve: if a user browses to page 6 of 10, then clicks on a sub-page, is there a way to make the “view all” button go back to page 6 instead of the main parent page? Obviously this is dynamic, so I need a way to figure out which page of pagination the sub-page “belongs” to.
A js history link wouldn’t do it, because what if the user clicked ‘next’ a few times. I’d still want ‘view all’ to go the paginated page containing the sub-page you were just on.
I hope that makes sense