I was using the paginator and it was working pretty well for me when I
was using all the search criteria as named url parameters. I
discovered that the paginator didn't send the parameters to the next
pages so implemented sessions to store the criteria.
The arrays I create from the session (critera/order) generate fine and
the page number variable I take from the named url parameter.
examples of values follow....
$conditions = Array
(
[sale] => 1
)
$theorder = Array
(
[created_date_time] => DESC
)
$resultsperpage = 10;
$page = 1; // or 2, 3, etc
My paginator call is:
$data = $this->paginate('Property', $conditions, $theorder,
$resultsperpage, $page);
For some reason it respects the conditions, order and results per page
but NOT the page number. Anyone have any ideas why? I test the value
of the $page variable and it does correctly change but the data
received from the model remains the same.
Am I doing something wrong here? I can't figure out what's going on....
thanks!
bryan
--~--~---------~--~----~------------~-------~--~----~
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:
Post a Comment