I also found a need for the view to set variables that can be used by
the layout. I think even things like setting the page title, or
including special CSS for that page should be done in that specific
page view and not the layout or the controller.
The method I used was this:

// mypage.thtml
<?php $this->variable = 'Something';?>

// layout.thtml
<?php echo $this->variable?>

It's not the most elegant solution, but seems to work fine.


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