Re: display var from view in layout

2008-07-06 Thread Grant Cox

For anyone else wondering, just have a $this-set('layout_var',
'content') in your view, then in the layout file you can use
$layout_var .


On Jul 6, 6:15 am, bmgz [EMAIL PROTECTED] wrote:
 I managed to figure this out, however it wasnt as elegant or simple as
 it could be..
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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
-~--~~~~--~~--~--~---



display var from view in layout

2008-07-05 Thread bmgz

Hi All,

I need to display a few vars from my view in the layout.. I don't want
to complicate things by adding another layout so this is basically
what I want to do:

I have a script which uses Google Maps. I need to assign a block of
javascript to a var in between the head tags and need to assign the
onload='load()' parameter to the body tag. so basically my layout
will look like this:

html
head
?php echo $head_content; ?
/head
body?php echo $body_tag_params; ?
...

Is there a simple way to accomplish this? I really don't want to use
the controller if possible..

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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: display var from view in layout

2008-07-05 Thread bmgz

I managed to figure this out, however it wasnt as elegant or simple as
it could be..

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
CakePHP 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
-~--~~~~--~~--~--~---