How to Get the View Template Content as a String in Variable

How to Get the View Template Content as a String in Variable?

This is For Cakephp, It Loads the Template Content as a string in a variable.

$view = new View($this, false);
$view->set(compact('parameter1', $parameter1));
$view->set(compact('parameter2', $parameter2));
$html = $view->render('view_page_name');

Leave a Reply

Your email address will not be published. Required fields are marked *