Ah, now I understand better what you were getting at :-)
For nesting, best to check out cakephp's new nested set tree:
https://trac.cakephp.org/changeset/5331
Assuming you're using Cake 1.2, you'll need to patch your existing
Tree.phpwith the version at the link above.
You'll then be able to use the Nested Set model in your database table,
which would then lead right into how the sorting is handled.
In your model, you would add something like:
var $actsAs = array('Tree');
var $belongsTo = array(
'Parent' =>
array(
'className' => 'Content',
'foreignKey' => 'parent_id',
'conditions' => '',
'fields' => '',
'order' => '',
'counterCache' => ''
),
);
You would add three columns to your table: lft, rght, parent_id (all int
fields)
Then when you save a dataset (whether adding/editing), you would make sure
the parent_id is set. That will trigger the Tree into action, it will define
each item's Parent, and how each item fits between it's neighboring items.
This article gives more info about using the nested set:
http://www.developer.com/db/article.php/3517366
There are likely other ways to do this, but this is my fave :-)
As for plugging in any ajax, or other type of UI, I'll let someone else
answer that, I'm not good with user-interface stuff.
cheers
On 6/26/07, Mech7 <[EMAIL PROTECTED]> wrote:
>
>
> Does anybody know if there is an example somwhere which shows how to
> create a nested sortable with the ajax helpers and scriptaculous..
> Like for example this one from mootools:
> http://youmuppet.com/wp-content/uploads/2007/04/mootree.html
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---