user319198
user319198

Reputation:

Changing layout extension in Zend Framework

Can we change extension of layout files from phtml to php in ZF ?

How ?

Upvotes: 2

Views: 261

Answers (1)

Marcin
Marcin

Reputation: 238159

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

Upvotes: 3

Related Questions