The CakePHP documentation has zero information on this function. The
API has very little more. I've looked at the code, but am not sure I
fully understand what it's supposed to be doing.

I was under the impression that I could pass reorder() a field out of
the table and it would alter the lft and rght so that the next query
to children() would be in the same order as that field, but while I've
got the function seemingly working (finishing my AJAX call is taking a
lot longer than it did without the call, I presume it's doing
something), I don't see any change to my data. I tried using this
thread to figure how to make everything work right, but I'm just not
seeing any changes:
http://groups.google.com/group/cake-php/browse_thread/thread/b782b5a389e3509d?fwc=1

Here's my code:

        public function admin_save() {
                $this->layout           = 'ajax';
                $this->autoLayout       = false;
                $this->autoRender       = false;

                if(empty($this->data)) :
                        $response = array('No input.');
                else :
                        $response = $this->NavigationNode->saveAll($this-
>data['NavigationNode'], array('validate'       => 'first',
                                                                                
                                                                                
                        'fieldList'     => array('line', 'node_id')));
                        if($response) :
                                $this->NavigationNode->reorder(array('field' => 
'line', 'order' =>
'DESC'));
                        endif;
                endif;
                $this->header('Content-Type: application/json');
                echo json_encode($response);
                return;
        }

"line" is the field that specifies the order of items in a given
node's children.

Thanks!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to