i Have default.ctp. default.ctp include top.html,center.html,down.html. And then center.html include left.html, right.html. I want put my $content_for_layout in the right.html,But I can't do it. if I change right.html to right.php It will tell me Notice: Undefined variable: content_for_layout in /opt/lampp/htdocs/app/webroot/right.php on line 37. if I change right.html to right.ctp Then it doesn't identify the file. all the pages I put them in app/webroot/ Could someb开发者_JS百科ody tell me how to do it?
Each of your frames will be loaded through a separate HTTP request and need to pass through the entire Cake framework for their content to be rendered. Just putting $contents_for_layout
in some random file will not do much. As such, your frames need to link to Cake URLs:
src="<?php echo $this->Html->url(array('controller' => 'foo', 'action' => 'bar')); ?>"
But really, you shouldn't use framesets in this day and age.
精彩评论