On May 7, 2007, at 2:20 PM, Greg Cerveny wrote:
> > Hello, > > I'm creating a sample cakephp app just to play with. > > Question 1: Layouts > > I want to greet the user and keep that at the top of every page (ie Hi > Greg), however none of the variables I set seem to be available to my > layout file. Are we able to pass more than the pagetitle into the > layout files? How are you doing this? I'm pretty sure set() will do that. > Question 2: Menus > > I want to include a navigational menu for the users. Is this best > included in an element or view? > > I noticed the elements seem to be called from directly views, with > arrays passed in. Seems like a bit of extra data pushing to send > information to a view, and then into an element, but on the other > hand, it seems like a highly reusable component best suited for an > element. I'd use an element in conjunction with requestAction() to just get the data for the element. When you use rA() to render a whole view, that's pretty expensive, but using rA() to grab the view/element vars isn't bad at all. -- John --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
