On 7/31/06, lorenzo <[EMAIL PROTECTED]> wrote:
>
> nate ha scritto:
>
> > but that's controller code.  You should, however, still be able to use
> > $this->layout in your view templates.
> Sure ... but is better in controller than in view ;)
>

I've just been using

<? $this->layout = 'other_layout'; ?>

which works just fine.

My current problem is how to get a view to set a variable that is
available in the layout. From everything i've read. this should be
easy, but i'm just not getting any loving.

I baked a trivial example:

my layout contains
  <p>my favourite cheese is <?= $cheese ?></p>

my view contains
<?
  $this->controller->set( 'cheese', 'cheddar' );
  $cheese = 'brie';
?>

but the variable always comes out blank.

Can anyone help?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to