Pagination Recall

By Matt Curry aka "mattc"
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 612

CakePHP team comments Author comments

Comment

1 Thanks for it

Your component is very useful. Many times when I modified something I was dropped to the first page. Now it's more comfortable :]
posted Tue, Feb 5th 2008, 02:19 by wokowy

Comment

2 Why not make use of the referer

For example many times I'll be paging through a sorted list of records and want to edit a particular one. After I edit and save I'm dropped back to the index with the default sorting on page 1.
Hi, from the above description the problem could easily be avoided if instead of redirecting to the index, you redirected to (the referer url when they first entered the edit function) when the edit was finished.
The only time what i propose wouldn't work is if you are storing settings in the session.
posted Tue, Feb 5th 2008, 08:40 by Andy Dawson

Comment

3 Referer is good

I agree with Andy I have used that technique because it does not only redirects to the index it can redirect you from a diferent controller, anyway I think the component is nice.
posted Mon, Feb 11th 2008, 16:14 by Boris Barroso

Comment

4 RE Why not make use of the referer

...the problem could easily be avoided if instead of redirecting to the index, you redirected to (the referer url when they first entered the edit function) when the edit was finished.

Doh! I knew as soon as I published this someone would show me an easier way. Thanks for the tip Andy.
posted Sat, Feb 16th 2008, 17:37 by Matt Curry

Comment

5 thanks

Notice (8): Undefined index: url
posted Thu, Mar 27th 2008, 01:58 by z sw

Login to Submit a Comment