Hi there,
I posted a question yesterday that was somewhat lengthy. I've distilled it down to the code below. Quite simply, the index action is called, body copy is set to $this->view->body. Before we leave the action, I create a new local instance of a view and render a template from a different location. As a result, nothing is rendered at all by the index action.
If I comment out:
$view->render('forms', 'minimal_business_contact');
I get the output I expect!
Any ideas why?
/**
* Main index action
*/
public function indexAction()
{
// Get the 'body' markup
$body = $this->getPage()->get('body');
// Now, try and capture the output of a different template using a different instance of 'view'
$view = $this->getDI()->get('view');
$view->setRenderLevel(\Phalcon\Mvc\View::LEVEL_ACTION_VIEW);
$view->start();
$view->render('forms', 'minimal_business_contact'); <--- This Guy hurts!
$view->finish();
$form_markup = $view->getContent();
// Assign the $body markup with process HTML form
$this->view->body = $body;
}