Success!

Yes I admit :) I just copied the code from Eric without checking it
(I'm a cake n00b with a design background - not much php/programming).
Just needed to refer to the 'Node' model and change around a few other
things and I managed to get the array out. Then I used the tree helper
to convert it to a unordered list and it's working perfectly.

Now the rest is just details, I just need to work out how to get it
into a drop down and that's about it.

Thanks for all your help people.

On Feb 26, 10:47 pm, "Eric C Blount" <[EMAIL PROTECTED]> wrote:
> Um...should be a method of the model 
> class:http://api.cakephp.org/class_model.html#181aefe1bf7efe1504692c485c83caa8http://api.cakephp.org/1.2/classModel.html#181aefe1bf7efe1504692c485c...
>
> Are you calling it as $this->Node->findAllThreaded(...), as in the example
> in your first post?
>
> Eric
>
> On 2/26/07, double07 <[EMAIL PROTECTED]> wrote:
>
>
>
> > Firstly, thanks for your feedback, but I'm getting this error?
>
> > Fatal error: Call to undefined method stdClass::findAllThreaded() in C:
> > \wamp\www\cake\app\controllers\nodes_controller.php on line 45
>
> > Am I missing something here?
>
> > Cheers.
>
> > On Feb 24, 1:30 pm, "Eric C Blount" <[EMAIL PROTECTED]> wrote:
> > > The following helped me when I was setting up something like this:
>
> > >     $this->Category->recursive = 0;
> > >     $this->set('category_tree', $this->Category->findAllThreaded(null,
> > > array('id','parent_id','name'),'parent_id, name'));
>
> > > It'll give you a multidimensional array based on parent_id. You could
> > also
> > > use something like this to find parent nodes of an article.
>
> > > HTH,
> > > Eric


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to