Wow this is very helpful, thanks!
On Oct 4, 5:51 pm, brian <bally.z...@gmail.com> wrote:
> On Sat, Oct 3, 2009 at 10:44 PM,Rawna<asumaw...@gmail.com> 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 seems that I can't add a new parent
> > category. I'm not using a single parent node for everything (is this
> > advisable or do I really have to create a common parent node?). What I
> > want is to have a blank selection on my dropdown list to indicate that
> > the category I'm creating is a parent node.
>
> For an app I built with a Section tree, I used a single parent node,
> "root" with a NULL parent_id. When fetching a threaded list, top-level
> Sections, etc. I used 'Section.parent_id IS NOT NULL' in the
> conditions.
>
> To have Cake create an empty option at the top of your select element,
> use 'empty' => true in the params.
--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---