Additional layout placeholders?

2007-06-07 Thread mrtopher
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,

Re: Additional layout placeholders?

2007-06-07 Thread Joshua Benner
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

Re: Additional layout placeholders?

2007-06-07 Thread John David Anderson (_psychic_)
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

Re: Additional layout placeholders?

2007-06-07 Thread Chris Hartjes
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

Re: Additional layout placeholders?

2007-06-07 Thread Joshua Benner
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:

Re: Additional layout placeholders?

2007-06-07 Thread mrtopher
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

Re: Additional layout placeholders?

2007-06-07 Thread Fran Iglesias
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,

Re: Additional layout placeholders?

2007-06-07 Thread Juan Pablo Araya
If the left handed content is static, you can add the content in the layout through ? echo $this-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 ?

Re: Additional layout placeholders?

2007-06-07 Thread Dr. Tarique Sani
On 6/7/07, Juan Pablo Araya [EMAIL PROTECTED] wrote: If the left handed content is dinamically generated, you need to insert it through ? echo $this-requestAction('/mycontrollers/ myfunction'); ?. In mycontrollers controller you must have: Also check out Andy's mini controllers - they do the