开发者

cakephp problem with frameset

开发者 https://www.devze.com 2023-03-07 10:24 出处:网络
i Have default.ctp. default.ctp include top.html,center.html,down.html. And then center.html include left.html, right.html.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号