Zend Framework set view which returns html ready for output
I'm currently working on subscription mail message and have spotted one moment.
To make controller more cleaner i would like to put all html generation insi开发者_开发技巧de view script.
I know only render method for such needs, but it outputs script right away.
Thanks
$view = new Zend_View();
// path to your email view or what ever
$view->setScriptPath(APPLICATION_PATH . '/views/emails/');
// put html in this var
$html = $view->render('myview.phtml');
精彩评论