I using similar functionality as in Vokuro te email a user public function getTemplate($name, $params)
public function getTemplate($controller, $action, $params)
{
$parameters = array_merge([
'publicUrl' => $this->config->application->publicUrl
], $params);
return $this->view->getRender($controller, $action, $parameters, function ($view) {
$view->reset();
$view->setRenderLevel(View::LEVEL_ACTION_VIEW);
});
return $view->getContent();
}
But this main layout from my controller keeps being rendered which gives errors how can I prevent this? In my controller I did a $this->view->pick('controller/action') as I wanted to reuse a template from another controller. It seems that might be causing the issue.