Thursday, August 26, 2010

$paginator->numbers() not maintaining sort / direction

I'm having an issue where I want to maintain the sort and direction in
the page links. So in sort I do this:

<?php echo $paginator->numbers(array('separator' => '', 'tag' =>
'span')); ?>

Which prints my page numbers and appropriate links, and then manually
input in the URL:

http://localhost/businesses/index/page:1/sort:created/direction:asc/limit:3

However once a page link is click, next, previous, 1-10, etc the URL
changes to:

http://localhost/businesses/index/page:1/limit:3

and all sort information is lost. Within my controller I have the
appropriate code to maintain the sort and order, however, it is not
getting passed into the numbers function. Has anyone had this issue
before and has a work around been posted? Or am I simply missing
something? Any help would be greatly appreciated.

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: