Re: Excluding a node from a tree, and adding a parent node

2009-10-05 Thread Rawna
Wow this is very helpful, thanks! On Oct 4, 5:51 pm, brian wrote: > On Sat, Oct 3, 2009 at 10:44 PM,Rawna wrote: > > > Hi, I'm using Cake's Tree bhavior and I got a couple of questions: > > > 1. How do I exclude a node when generating a a tree list? (i.e. using > > generatetreelist()) ? I'm goin

Re: Excluding a node from a tree, and adding a parent node

2009-10-04 Thread brian
On Sat, Oct 3, 2009 at 10:44 PM, Rawna wrote: > > Hi, I'm using Cake's Tree bhavior and I got a couple of questions: > > 1. How do I exclude a node when generating a a tree list? (i.e. using > generatetreelist()) ? I'm going to use it when editing a category. > > 2. When adding a new category, it

Re: Excluding a node from a tree, and adding a parent node

2009-10-03 Thread Rawna
I actually solved number 1. I added my own Model function: function excludeIdGenerateTreeList($id = null) { if (!empty($id)) { $treeList = $this->generatetreelist(); unset($treeList[$id]); return $treeList; } } Now I just have

Excluding a node from a tree, and adding a parent node

2009-10-03 Thread Rawna
Hi, I'm using Cake's Tree bhavior and I got a couple of questions: 1. How do I exclude a node when generating a a tree list? (i.e. using generatetreelist()) ? I'm going to use it when editing a category. 2. When adding a new category, it seems that I can't add a new parent category. I'm not usin