Your example is good but you need to set the return attribute.
     $this->set($menu,  $this->Categories->requestAction('/categories/
getCategoryList', array('return'=>1)));

This is the type of thing that could use a cache as I descibed
  http://lloydhome.com/blog/archives/2007/02/More-Caching-in-CakePHP.html
and
  
http://groups.google.com/group/cake-php/browse_thread/thread/5e0034e1ce6c4798/#

If you follow the caching I posted then also add the cache parameter.
     $this->set($menu,  $this->Categories->requestAction('/categories/
getCategoryList', array('return'=>1, 'cache'=>1)));

HTH,

David Lloyd
--
lloydhome consulting, inc.
http://lloydhome.com


On Feb 17, 11:33 am, "Siegfried Hirsch" <[EMAIL PROTECTED]>
wrote:
> here is a small example:
>
> in your main controller or better in the app_controller in /app
>
> class AppController extends Controller  {
>   function beforeFilter() {
>     $this->set($menu,
> $this->Categories->requestAction('/categories/getCategoryList'));
>   }
> ...}
>
> /* not tested - just as a hint */
>
> now you can access $menu in your elements and even in the layout.
>
> Siegfried
>
> 2007/2/17, Helmi <[EMAIL PROTECTED]>:
>
>
>
>
>
> > i'll get attached to this. My current thoughts go in the same
> > direction. The only question is where to get the data for the element?
>
> > I want to use a list of categories from the Category Model within my
> > menu and i don't really know how to access the data from the Category
> > Model within the elements.
>
> > Any further help for this?
>
> > Thanks,
> > Frank
>
> --
> Siegfried Hirsch
> hhS - Welserstr. 1 - 81373 M?nchen - (089) 5484 3564 - 
> skype:shirschhttp://gadgetgui.de/http://www.rss-blogger.dehttp://www.newsbee.deNewsBee
>  2 - customized RSS solutions


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