开发者

Changing layout extension in Zend Framework

开发者 https://www.devze.com 2023-02-26 20:43 出处:网络
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:

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');
}
0

精彩评论

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