Zend Framework: render the template of another module

To access a phtml file of a different module, just create a new view object:

$view = new \Zend_View; 
$view->setScriptPath(APPLICATION_PATH . '/modules/MODULNAME/views/scripts/');
$inhalt = $view->render('ordner/template.phtml');

And it works!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.