public function setTemplateDir($templateDir)
    {
        $this->smarty->setTemplateDir($templateDir);
        if (!$this->getTemplateDir()) {
            throw new SmartyException("The template dir '" . $templateDir . "' does not exist.");
        }
    }