Re: Additional layout placeholders?
On 6/7/07, Juan Pablo Araya <[EMAIL PROTECTED]> wrote: > If the left handed content is dinamically generated, you need to > insert it through requestAction('/mycontrollers/ > myfunction'); ?>. In mycontrollers controller you must have: > Also check out Andy's mini controllers - they do the job very well and without requestAction http://www.noswad.me.uk/MiBlog/MiniControllers T -- = Cheesecake-Photoblog: http://cheesecake-photoblog.org PHP for E-Biz: http://sanisoft.com = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Additional layout placeholders?
If the left handed content is static, you can add the content in the layout through renderElement('the-element'), ?>. This element must be in app/views/elements/the-element.thtml as a simple html. If the left handed content is dinamically generated, you need to insert it through requestAction('/mycontrollers/ myfunction'); ?>. In mycontrollers controller you must have: function myfunction() { $this->layout = 'blank'; // Here you controll and send the content to app/views/ mycontrollers/myfunction.thtml } Note the $this->layout='blank'; It just use an empty layout so you don't paste the headers and other content of the original layout in the left handed element. The last thing you must do is create blank.thtml in app/views/layouts/. The content is just: Hope this helps, sorry for my poor english! On 7 jun, 10:36, mrtopher <[EMAIL PROTECTED]> wrote: > I'm very new to cake and just read the documentation on layouts. My > particular app has two main content areas... one for the views on the > right and another for section navigation on the left. After reading > the documentation it sounds like I only have access to one content > area within the layout, is this true? Can I make additional > placeholders in the layout? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Additional layout placeholders?
El 07/06/2007, a las 18:18, mrtopher escribió: > Sounds like I > might have to replicate a little more HTML than I would like but I > think it could work. AFAIK, you could insert elements in your layout via echo $this->element ('elementName'); so, you could have your "containers" in the layout, and fill them with elements, and the $content_for_layout for the output of the actual controller/action. (I've read about other ways to achieve similar results to solve some performance issues) -- Fran Iglesias [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Additional layout placeholders?
Ok, I think I get it. So then in my views I would have the html for my two columns with the forms or whatever on the left and then within that view I would include the element or elements that I want to show up on this page (specifically the section options). Sounds like I might have to replicate a little more HTML than I would like but I think it could work. Thanks for the help! On Jun 7, 11:56 am, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 6/7/07, mrtopher <[EMAIL PROTECTED]> wrote: > > > > > I'm very new to cake and just read the documentation on layouts. My > > particular app has two main content areas... one for the views on the > > right and another for section navigation on the left. After reading > > the documentation it sounds like I only have access to one content > > area within the layout, is this true? Can I make additional > > placeholders in the layout? > > Well, what goes into the layout is what will appear on EVERY SINGLE > PAGE that uses that layout. Me personally, I prefer to not mess with > the layout files and instead create elements for all the content I > want to use. I feel that's a better way to organize things rather > than hard-coding things into the layout. > > Hope that helps. > > -- > Chris Hartjes > > My motto for 2007: "Just build it, damnit!" > > @TheBallpark -http://www.littlehart.net/attheballpark > @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Additional layout placeholders?
I agree, I've found elements to be an excellent way to reproduce content on multiple pages. In the series of applications we're working on now, the default layout displays an element that produces navigation based on data obtained from the controller (tabs across the top). Chris Hartjes wrote: > On 6/7/07, mrtopher <[EMAIL PROTECTED]> wrote: > >> I'm very new to cake and just read the documentation on layouts. My >> particular app has two main content areas... one for the views on the >> right and another for section navigation on the left. After reading >> the documentation it sounds like I only have access to one content >> area within the layout, is this true? Can I make additional >> placeholders in the layout? >> >> > > Well, what goes into the layout is what will appear on EVERY SINGLE > PAGE that uses that layout. Me personally, I prefer to not mess with > the layout files and instead create elements for all the content I > want to use. I feel that's a better way to organize things rather > than hard-coding things into the layout. > > Hope that helps. > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Additional layout placeholders?
On 6/7/07, mrtopher <[EMAIL PROTECTED]> wrote: > > I'm very new to cake and just read the documentation on layouts. My > particular app has two main content areas... one for the views on the > right and another for section navigation on the left. After reading > the documentation it sounds like I only have access to one content > area within the layout, is this true? Can I make additional > placeholders in the layout? > Well, what goes into the layout is what will appear on EVERY SINGLE PAGE that uses that layout. Me personally, I prefer to not mess with the layout files and instead create elements for all the content I want to use. I feel that's a better way to organize things rather than hard-coding things into the layout. Hope that helps. -- Chris Hartjes My motto for 2007: "Just build it, damnit!" @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Additional layout placeholders?
On Jun 7, 2007, at 9:47 AM, Joshua Benner wrote: > > If I understand what you're saying... the only "built-in" content > variable is $content_for_layout which comes from the output from the > currently-executing view. > > However, layouts have access to the variables that you set in your > controller with $this->set() -- so you may be able to achieve the > functionality you're looking for that way. > > Also, consider the after/before filters for defining additional > separate-from-controller content to be included. > > I'm making stabs in the dark here -- does any of this help? You might consider using the view as a vehicle to display elements. Use requestAction() to grab data from a controller, and hand that data to dynamic elements, if you need. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Re: Additional layout placeholders?
If I understand what you're saying... the only "built-in" content variable is $content_for_layout which comes from the output from the currently-executing view. However, layouts have access to the variables that you set in your controller with $this->set() -- so you may be able to achieve the functionality you're looking for that way. Also, consider the after/before filters for defining additional separate-from-controller content to be included. I'm making stabs in the dark here -- does any of this help? mrtopher wrote: > I'm very new to cake and just read the documentation on layouts. My > particular app has two main content areas... one for the views on the > right and another for section navigation on the left. After reading > the documentation it sounds like I only have access to one content > area within the layout, is this true? Can I make additional > placeholders in the layout? > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---
Additional layout placeholders?
I'm very new to cake and just read the documentation on layouts. My particular app has two main content areas... one for the views on the right and another for section navigation on the left. After reading the documentation it sounds like I only have access to one content area within the layout, is this true? Can I make additional placeholders in the layout? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~--~~~~--~~--~--~---