Here you have more info about the parameters and other things..
http://wiki.script.aculo.us/scriptaculous/show/Sortable.create

Basically you have to do something like:

<ul id="items">
<li id="item_1">Item</li>
<li id="item_4">Other Item</li>
</ul>

Where "1", "4" are (in this example) the ids of the items, and then add
the sortable javascript with the Ajax helper:
<?php echo $ajax->sortable('items', array('url'=>'order'));?>

Where "order" is an action in your controller where you can do
something like:

        if (isset($_POST['items']))
        {
            $sortableitems = $_POST['items'];

            $i = 0;
            foreach ($sortableitems as $item)
            {
                $this->UsefulLink->id = $item;
                $this->UsefulLink->saveField('order', $i);
                $i++;
            }
        }


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