public function renderWithLayout($template, array $localVariables = array())
    {
        $this->addData(array(
            'localVariables' => $localVariables,
            'view'           => $template,
        ));

        return $this->render($this->getLayout(), $localVariables);
    }