On Dec 13, 3:34 pm, AJ <[EMAIL PROTECTED]> wrote:
> > Something to play with:http://bin.cakephp.org/view/375925194
> > $data would be flat findAll sorted by lft.
>
> Thanks a ton, but I'm having some issues.
>
> Here is what's in my controller:
> var $helpers = array('Tree' );
> $this->set('navContent', $this->Content-
>
> >findAll(null,null,'Content.lft ASC'));
>
> ...and in my layout:
> echo $tree->generate($navContent);
>
> And I'm getting these errors:
>
> Undefined variable: node [CORE/app/views/helpers/tree.php, line 65]
> Undefined variable: itemReturn [CORE/app/views/helpers/tree.php, line
> 65]
The code does not know the name of the model (array key) to loop on,
look at the example usage in the comments (you need to pass something
in the 2nd parameter)
hth,
AD
PS. there /is/ a typo $itemReturn should just be $return.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---