Not sure what you are doing, (if it's just one variable) using the session like the guys have described above is probably easiest, but if you wanted to do anything more complex, you might want to check out using slots for setting up dynamic areas in your layout which can be populated by each actions template... Just check the book for all the info, its well written for this topic.
On May 21, 7:09 pm, Stephen <[email protected]> wrote: > I got it. Thank you both. > > Regards, > Stephen > > On May 21, 2:41 pm, Dheeraj Kumar Aggarwal <[email protected]> > wrote: > > > Hi Stephen, > > > u can use $request->setAttribute('url','bla'); in your actions class > > and use it in layout by using > > $sf_request->getAttribute('url'); > > > On Thu, May 21, 2009 at 7:04 AM, Stephen <[email protected]> wrote: > > > > I define a variable in action: $this->url='bla'; > > > I want to use this variable in the layout.php, but I got this message > > > "Notice: Undefined variable: url in /www/apps/frontend/templates/ > > > layout.php on line 28" > > > > Could any body tell me what's the problem? What should I do if I want > > > to set a variable on "layouot.php" from the control layer? > > > -- > > Regards, > > Dheeraj --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" 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/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
