im trying to disable layout while showing error/exception page in my zf2 module
but nothing works
please help
Final Solution in my Module.php
$eventManager = $e->getApplication()->getEventManager();
$eventManager->attach(MvcEvent::EVENT_DISPATCH_ERROR, function($e) {
$result = $e->getResult();
$result->setTerminal(TRUE);
});
it works and only loads error/404 view file not the layout file
thanks andrew