On 8/6/07, housebolt <[EMAIL PROTECTED]> wrote:
>
> I believe you can do it this way:
>
> for level 1:
> $this->Category->findAllByParentId(0, null, 'Category.id ASC');  //
> Third argument for findallby
>
> in your model, in the 'Childnode' array, add 'order'=>'Childnode.name
> ASC' (or DESC depending on what you want) to the array.
>
> var $hasMany = array(
>         'Childnode' =>
>                         array(
>                         'className' => 'Category',
>                         'foreignKey' => 'parentid',
>                         'order' => 'Childnode.name ASC'
>         ),
>
Hi Housebolt,

It is working nicely. Thanks !

> I recommend the CakePHP cheat sheet from the CakePHP front page.
>
>

Will do that.

Regards,

Feris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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