Changing layout extension in Zend Framework
Can we chang开发者_如何学Goe extension of layout files from phtml to php in ZF ?
How ?
One way would be to add the following line into your application.ini
:
resources.layout.viewSuffix = "php"
Another way would be by specifying the new extension in your bootstrap.php
, e.g.:
public function _initLayoutExtension() {
$layout = $this->bootstrap('layout')->getResource('layout');
$layout->setViewSuffix('php');
}
精彩评论