Technically, you can even call the requestAction from the view itself.

However, if possible you should avoid requestActions, as they are
slow.  And for something in your layout (ie appearing on every page),
a better solution would be to have a function in your model to load
the appropriate data (which is called by every appropriate controller
action, perhaps in the app_controller beforeFilter), and an element
being rendered in your layout to display this data.  If this is very
similar to a standalone view - there is nothing stopping you from
having that view just render the same element (so no duplication, as
there is nothing in the view).


On Oct 25, 9:31 am, pizzro <[EMAIL PROTECTED]> wrote:
> maybe you need set a $var in layout file, then call $this->set("var",
> $this->requestAction(url,array("return"))),


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