I've created a Tree structure following this example. The nodes are added successfully but the parent field is empty and I can't add a child to any node using the add.ctp view! How can I fill this field with category names already exist in table? Shouldn't it load them automatically? As you see in the picture the Parent field is empty!
Thanks for any help in advance.
If your field in form is parent_id you should have $parents aviable in the view. So propably in Category add action you should do:
$parents = $this->Category->Parent->find('list');
$this->set(compact('parents'));
notice that $this->Category->Parent
would only work if you have proper relation set in the Category model...