Pagination Recall
Does it drive you nuts when you edit an item on page 4 of a list, then when you save you're dropped back to page 1 with the list back in the default order? The PaginationRecall component automatically remembers the page you were on and the sorting so you're returned to the same spot on the list.
Comments
Comment
1 Thanks for it
Comment
2 Why not make use of the referer
The only time what i propose wouldn't work is if you are storing settings in the session.
Comment
3 Referer is good
Comment
4 RE Why not make use of the referer
Doh! I knew as soon as I published this someone would show me an easier way. Thanks for the tip Andy.
Comment
5 thanks
Comment
6 Code
Comment
7 Referrer is not always reliable
(After some research, I found that my friend was using a Firefox extension that purposely mangles his referrer data and does several other annoying things in the name of "security", but it does make one wonder how many other folk are using similar tools and blame their troubles with websites on the web designer rather than on their own choice of "security" tools. Something to think about...)
Comment
8 THANKS SO MUCH - This is what you need for AJAX Pagination
Comment
9 Easier way without using the session
$paginator->current()
Then in your controller, when you have completed what you need to, do this:
where $page is the extra parameter you passed in above.$this->redirect($this->referer()."/page:".$page);