For the whole three I want to sort all the direct childs first on date-
of birth and then on lastname, so I think the reorder-method won't
work.
I tried the following method:
$this->Person->children(array(
'order' => 'date_of_birth ASC, lastname DESC'))
It works, but it fucks up my whole tree, thats because the tree is
'build' as follows:
$this->Person->children(array(
'order' => 'lft'))
When I do the following, the direct childs of every parent are NOT
sorted by date_of_birth and then by lastname
$this->Person->children(array(
'order' => 'lft, date_of_birth ASC, lastname DESC'))
Does anyone know how I can sort direct childs of every parent for a
whole tree at once?
On 13 sep, 11:44, AD7six <[email protected]> wrote:
> On 13 sep, 02:14, Jeroen <[email protected]> wrote:
>
> > By default the Tree-behaviour is sorted by 'name'.
>
> Since when - the tree behavior doesn't care about 'order'.
>
> You probably
> wanthttp://api.cakephp.org/class/tree-behavior#method-TreeBehaviorreorder
>
> AD
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---