My issue with the cake site is it never gives a thorough description on anything. It's why I'm always on nabble asking silly questions :P From what I read from the link you provided, it seems I need to do something with the $this->render function.
The set variables I've already defined do not automatically show up in my layout/view/default.ctp as the posts above implied. Where can I call the render function to properly direct my variables to the layout. Do put in the controller action: $this->render(null, 'layout'); Will that send all that actions set variables to the layout? Or is there something I need to call in default.ctp to get that information. Unfortunately, I'm still confused about this... Miles J wrote: > > > Perhaps you should read the documentation before proceeding any > further. > > http://book.cakephp.org/view/57/Controller-Methods > > On Oct 2, 4:11 am, Bert Van den Brande <[email protected]> wrote: >> Calling $this->set('someInformation', 'someValue') in the controller will >> make the var $someInformation available in both the view and the layout >> ... >> I think :) >> >> On Fri, Oct 2, 2009 at 10:08 AM, hahmadi82 <[email protected]> wrote: >> >> > I'm not sure I follow. How do I pass the information into the layout >> file? >> >> > Miles J wrote: >> >> > > Just put <?php echo $content_for_layout; ?> in your layout file, and >> > > then Cake will render your controllers view within that variables >> > > location. >> >> > > On Oct 1, 3:05 pm, hahmadi82 <[email protected]> wrote: >> > >> Correct, I want to use stuff from my cars controller in the >> > >> views/layout/default.ctp. The only possible solution I can think is >> to >> > >> use >> > >> ajax to load some of the car stuff. Basically, I'm curious how you >> can >> > >> access your database from the layout file. >> >> > >> Miles J wrote: >> >> > >> > Im sorry but I dont understand what you are asking. >> >> > >> > Layout toolbar? Controller class? Do you mean component? >> >> > >> > Layout has no controller? Not sure what you mean there. >> >> > >> > Database in layout? You mean your result right? >> >> > >> > On Oct 1, 1:52 pm, hahmadi82 <[email protected]> wrote: >> > >> >> Hi, >> >> > >> >> I built a class with controller/views that I want displayed in my >> > >> layout >> > >> >> toolbar. Is this possible? How can I use this queried data in >> my >> > >> layout >> > >> >> file? Since layout has no controller, I'm not sure how I can use >> any >> > >> >> database stuff in the layout.... >> > >> >> -- >> > >> >> View this message in >> >> > >> context: >> >http://www.nabble.com/Access-Classes-In-Layout-Help---tp25706283p2570... >> > >> >> Sent from the CakePHP mailing list archive at Nabble.com. >> >> > >> -- >> > >> View this message in >> > >> context: >> >http://www.nabble.com/Access-Classes-In-Layout-Help---tp25706283p2570... >> > >> Sent from the CakePHP mailing list archive at Nabble.com. >> >> > -- >> > View this message in context: >> >http://www.nabble.com/Access-Classes-In-Layout-Help---tp25706283p2571... >> > Sent from the CakePHP mailing list archive at Nabble.com. > > > > -- View this message in context: http://www.nabble.com/Access-Classes-In-Layout-Help---tp25706283p25722068.html Sent from the CakePHP mailing list archive at Nabble.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
