Read template into variable

Hi, cant read volt template into variable?

Smarty analog - $smarty->fetch();

Thanks.

Sure you can.

Depending on type of View component you're using, in this example using Simple view:

$bufferedContent = $this->view->render('email/template.volt');

P.S. View has also method to fetch content getContent().