Zend Framework: render the template of another module


August 05, 2013 at 06:59
Zend Framework

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!

Tags: modul module render


Hinterlasse einen Kommentar:
Search