private function loadSmarty()
    {
        if (is_null($this->smartyInstance)) {
            $this->smartyInstance = new Smarty();

            // Then prepare all variables
            $this->smartyInstance->setCompileDir(Core::$tempDir . DS . 'Smarty' . DS . 'Compile');
            $this->smartyInstance->setCacheDir(Core::$tempDir . DS . 'Smarty');
        }
    }