public function render($template, array $localVariables = array())
    {
        $view = $this->getView();

        if ($view->getLayout()) {
            $content = $view->renderWithLayout($template, $localVariables);
        } else {
            $content = $view->render($template, $localVariables);
        }

        $this->getResponse()->setBody($content);

        return $this;
    }