> Is there a way to paginate data from a tree? I am using the Tree Behavior
> but having problems pagination the data.
You need to order the data by the lft value, eg:
$this->paginate['Product'] = array(
'order'=>array('Prodcut.lft asc');
);
$this->data = $this->paginate();
To make the position in the tree clearer, I save the level of each
branch in the db. Count the value of $this->Product->getpath($id,
array('Product.id')); in the afterSave callback.
hth
Jon
--
jon bennett - www.jben.net - blog.jben.net
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 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