Thank you for your reply. I think the approach the tutorial suggests is
the second one: the problem is: the problem is how do I specify the
menu array into the component? In the tutorial the array is hard-coded
into the component. In order to use the "nodes" controller function
that creates the array I modified the components's startup function
like this:

function startup(&$controller)
    {
        $this->controller = &$controller;
        //ADDED the following row
        $this->MenuItems = $this->requestAction('/nodes/get_data');
        $this->MenuItems = $this->checkGroup($this->MenuItems);
        $this->controller->set('MenuItems',$this->MenuItems);
    }

but the application times-out.

Note that adding "$MenuItems=$this->requestAction('/nodes/get_data/')"
to the view element that renders the menu works well! but I think more
correct would be passing the array into the component, where I can
apply other businness logic, than into the view, am I correct?


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to