In Zend Framework we can change the file extension of view files from phtml to php by adding following code to controller.
$this->getHelper('viewRenderer')->setViewSuffix('php');
But how to change the file extension for layout files?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Untested, but likely through
Zend_Layout::setViewSuffix()– Set layout view script suffix andZend_Layout_Controller_Action_Helper_Layout::getLayoutInstance()Try
You can also try
There is also
Zend_Application_Resource_Layout, so you can likely setup theviewSuffixfrom your application.ini as well when usingZend_Application, e.g. something like