I am using the tree behavior (first time) and got a question about
sorting.
I am using it for a multilevel menu system with drag&drop sortables.
Everything works very nicely, but can't figure one thing out. When I
sort items on the same level the parent_id doesn't change and the tree
structure doesn't get updated.
The solution I use now, is by setting the parent_id to NULL and back
again. See below.
$this->MenuItem->saveField('parent_id', 'NULL', false);
$this->MenuItem->saveField('parent_id', $parentId, false);
Is this the way to bypass this behaviour or are there better ways to
do this?
Thanks,
Adriaan
--~--~---------~--~----~------------~-------~--~----~
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