我想让 Zend_Layout 包含 header.phtml 和 footer.phtml 以及 [layout name].phtml。
我怎么做?我尝试阅读Zend_Layout、Zend_Layout_Controller_Plugin_Layout中的代码。我还是想不通。。
您可以在layout.phtml 文件中包含页眉和页脚文件。这是一个例子:
<div id="header"><?= $this->render('layouts/header.phtml') ?></div>
<div id="nav"><?= $this->render('layouts/nav.phtml') ?></div>
<div id="content"><?= $this->layout()->content ?></div>
<div id="footer"><?= $this->render('layouts/footer.phtml') ?></div>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)