cakephp框架集问题
我有default.ctp。 default.ctp包括top.html、center.html、down.html。 然后center.html包括left.html,right.html。 我想把我的 $content_for_layout 放在 right.html 中,但我做不到。如果我将 right.html 更改为 right.php 它会告诉我 注意:未定义的变量:第 37 行 /opt/lampp/htdocs/app/webroot/right.php 中的 content_for_layout。如果我将 right.html 更改为 right.ctp 那么它不会识别该文件。 我把它们放在 app/webroot/ 中的所有页面 有人可以告诉我该怎么做吗?
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 somebody tell me how to do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个框架都将通过单独的 HTTP 请求加载,并且需要通过整个 Cake 框架才能呈现其内容。仅将
$contents_for_layout
放入某个随机文件中不会有太大作用。因此,您的框架需要链接到 Cake URL:但实际上,您不应该在当今时代使用框架集。
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:But really, you shouldn't use framesets in this day and age.