I am working in the error controller of my default module but I have other modules/controllers that have errors. Their errors are sent to the default/error controllers but the layouts that are used are the ones from the module that threw the error. I want to only use the default modules layout for all errors.
views:
437answers:
2
+3
A:
<?php
class ErrorController extends Zend_Controller_Action
{
public function init()
{
parent::init();
$layout = Zend_Layout::getMvcInstance();
// Set a layout script path:
$layout->setLayoutPath('/path/to/you/default/module/layouts');
// choose a different layout script:
$layout->setLayout('foo');
}
}
SM
2009-12-21 13:18:13