ZF2 - How to change the error/404 response page? Not just template but to set a new ViewModel
By default the page is set like this in the Application module.config array: 'template_map' => array( 'error/404' => __DIR__ . '/../view/error/404.phtml' I want to change the page. I want new ViewModel for it full of variables. It means that simply to change the template is not enough: 'error/404' => __DIR__ . '/../view/error/my_new_404_template.phtml' But I can't understand how to make it. I can't see the way the request comes to the 'error/404' . How to create new ViewModel for it? How to attach variables to it? How the route comes to 'error/404' to catch it to change? For example, I have