Thanks Will,
I didn't know this and find it useful, having my troubles, from time to
time, with pagination.
Cristian
Will Poillion ha scritto:
> Ok, I found the problem everyone.
>
> For anyone also having this problem, it is the default pagination.
>
> var $paginate = array('limit' => 100, 'page' => 1, 'sort' => 'name',
> 'direction' => 'asc');
>
> If you set a default sort and direction in your controller, all of
> your sorting will only work in one direction.
>
> In the case above, the only link it would create in for the field
> 'name' was a 'desc' one. Conversely, for all other fields it would
> only create an 'asc' one.
>
> One I took them out:
>
> var $paginate = array('limit' => 100, 'page' => 1);
>
> All of the sorting links worked fine, in both directions. My
> suggestion is if you want to have a default sort/direction, just pass
> them as arguments from the referring page:
>
> /controller/index/sort:name/direction:asc/
>
> Will
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---