Stefano Torresi wrote
> or you can just specify a path hierarchy starting from the 
> template_path_stack setting, but without the .phtml at the end:
> 
> // module.config.php
> return array(
> 'view_manager' => array(
>          'template_path_stack' => array(
>              __DIR__ . '/../view',
>          ),
>      ),
> );
> 
> // controller or event
> $viewModel->setTemplate('template/default/example');

And using this method, zf keeps trying to get the view from the older
location (module/controller/action) and excepts:

Uncaught exception 'Zend\View\Exception\RuntimeException' with message
'Zend\View\Renderer\PhpRenderer::render: Unable to render template
"main/index/index"; resolver could not resolve to a file' in
C:\www\zf2\system\vendor\zf2\library\Zend\View\Renderer\PhpRenderer.php on
line 451



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/bootstrap-event-to-change-template-tp4657144p4657160.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com


Reply via email to