views:

31

answers:

1

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 inside view script.

I know only render method for such needs, but it outputs script right away.

Thanks

+2  A: 
$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');
ArneRie
Hmm you are creating new instance of view. Very interesting. That's why it didn't worked for me i guess, i was doing the same. I'll check this out. Thanks you.
Beck
Working like a charm. Forgot to reply. :)Thanks again
Beck