Reputation: 83695
Is there a way how I can get a complete HTML output of a controller action? Is there some method for that?
Thanks.
Upvotes: 1
Views: 2025
Reputation: 11042
Action view helper may be useful, from the docs:
<div id="sidebar right">
<div class="item">
<?php echo $this->action('list',
'comment',
null,
array('count' => 10)); ?>
</div>
</div>
Of course, you can replace echo with storing the var or do it outside of the view script.
Upvotes: 2
Reputation: 27313
$html = $this->view->render('view.phtml');
I think you should be able to also get this by playing with the response object.
like :
$this->getResponse()->getBody();
Upvotes: 3