Brian is correct. You should use $this->element() to format how you
want each column on your page to be displayed. So you could have a
right, left, and center view in your elements folder then have a
variable set in your function for the view for each column.  Each
column then would could use the respected variable to display the data
where you want it and how you want it formatted.

On Apr 15, 6:58 pm, brian <[email protected]> wrote:
> $content_for_layout is essentially everything in your view, after PHP
> has parsed it. I think what you probably want is to use
> $this->element().
>
> On Wed, Apr 15, 2009 at 7:24 PM, Dave Maharaj :: WidePixels.com
>
> <[email protected]> wrote:
>
> > So if I had <?php echo $content_for_layout; ?> in default.ctp and then in
> > the actual ctp for action say posts/view I could inside the view.ctp have 2
> > variables
> > <?php echo $leftContent_for_layout; ?> and <?php echo
> > $rightContent_for_layout; ?> for each side of the columns and define what
> > would show up there by defining it in the controller view () action?
>
> > Thanks,
>
> > Dave
>
> > -----Original Message-----
> > From: dr. Hannibal Lecter [mailto:[email protected]]
> > Sent: April-15-09 7:28 PM
> > To: CakePHP
> > Subject: Re: Layout Columns
>
> > Of course you can. $content_for_layout is nothing but a regular view
> > variable, like the ones you set in your controller with $this->set().
>
> > On Apr 15, 10:43 pm, "Dave Maharaj :: WidePixels.com"
> > <[email protected]> wrote:
> >> Can you take 1 template (default.ctp) and define sections within it?
>
> >> I have a 2 col layout and would like to define what modules to load
> >> depending on the page a user is on / if logged in / by group
>
> >> How can this be done if all i have is <?php echo $content_for_layout;
> >> ?>
>
> >> Thinking of Joomla where you can set what modules for each page is the
> > idea.
> >> Is that possible?
>
> >> Dave
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to