从多个块构建模板
大家好!希望你今天过得愉快。 我今天的挑战是...我可以有一个模板 (ctp),其中包含来自单独 CTP 模板的嵌套块吗?例如:
某些带有标题的表单以及不带有
<h1 id-"Something">Testing</h1>
<div class="main section">
<div class="">
-Section 1 - this would another ctp (include **section1.ctp**)
-Section 2 - this would another ctp (include **section2.ctp**)
</div>
</div>
<footer>something here</footer>
标题的表单的其余部分
Good day everyone! hope you are having a good day.
My challenge today is... Can I have a template (ctp) with nested blocks from separate CTP templates. For instance:
Some form with headers and what not
<h1 id-"Something">Testing</h1>
<div class="main section">
<div class="">
-Section 1 - this would another ctp (include **section1.ctp**)
-Section 2 - this would another ctp (include **section2.ctp**)
</div>
</div>
<footer>something here</footer>
Rest of the form
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,你可以,一切都在 cakephp 书中清楚地记录了
https: //book.cakephp.org/4/en/views.html
与 CakePHP3
Yes, you can, everything is neatly documented in the cakephp book
https://book.cakephp.org/4/en/views.html
the same is for CakePHP3