On Tue, May 26, 2009 at 11:56 AM, Bs <[email protected]> wrote:
>
> Hi,
>
> I'm trying to order my index view by several conditions. As far as I
> can see from the documentation, the $paginator only accepts one key
> for sorting the model.
>
> http://book.cakephp.org/view/166/Pagination-in-Views
>
>  What is the best practice to order my model by several keys? (For
> example, ordering my cities by country, region, and city name in my
> index view)

'order' => array(
        'City.country' => 'ASC',
        'City.region' => 'ASC',
        'City.name' => 'ASC'
)

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to