hi,
I've this code in my view:

<ul id="list">
<?php foreach ($pagine as $pagina) { ?>
    <li id="item_<?php echo $pagina['Page']['id'];?>">ID: <?php echo
$pagina['Page']['id'];?> - <?php echo $pagina['Page']['title']?></li>
<?php } ?>
</ul>
<p id="list-info"></p>

<?php echo $ajax->sortable('list', array('url' =>
'/dashboard/ordinapagine', 'update' => 'list-info', 'complete' => 'new
Effect.Highlight("list",{})'))?>

in my controller:

        function ordinapagine() {
          $ids = $this->params['form']['list'];
                debug($this->params);
                $i = 1;
          foreach($ids as $id){
            $this->Page->id = $id;
            $this->Page->saveField('order', $i++);
          }
                $this->autoRender = false;
        }

when I debug($this->params) however I don't get all elements, but only
this:
    [form] => Array
        (
            [list] => Array
                (
                    [0] => 5
                )

            [_] =>
        )

this prevents me to save the correct order. anybody has a clue?
thanks.


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