May we assume that you are employing the Tree Behavior<http://book.cakephp.org/view/1341/Basic-Usage>in this Section model?
If so, the parent_id would only be null for the top most parent... correct? Generally, when you use a tree or this kind, you must look at it like a collection? So the top most element describes the collection. So, you would always assume is had children and that is always has a parent... then test accordingly. If not, then you have some more obvious errors in the code you provided... but before we get in to that... let's answer the Tree question. Let me know. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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