Not loading a template

127 Views Asked by At

I have this code:

protected $_sThisTemplate = 'editor.tpl';

public function render()
{
    try
    {
        parent::render();

        $oSmarty                            = oxUtilsView::getInstance()->getSmarty();

        $this->_aViewData['stylesheet']     = dirname(dirname(__DIR__)) . '/Media/Stylesheet/stylesheet.css';

        $this->_aViewData['linesFromFile']  = HtaccessEditor_Model_Editor::getLinesFromFileToEdit(dirname(dirname(dirname(dirname(__DIR__)))) . '/.htaccess');

        $this->_aViewData['whatForEditor']  = 'htaccess';

        $this->_aViewData['oViewConf']      = $this->_oViewConf;

        $oSmarty->assign('oViewConf', $this->_aViewData['oViewConf']);

        $oSmarty->assign('stylesheet', $this->_aViewData['stylesheet']);

        $oSmarty->assign('linesFromFile', $this->_aViewData['linesFromFile']);

        $oSmarty->assign('whatForEditor', $this->_aViewData['whatForEditor']);

    }
    catch (Exception $e)
    {
        echo 'Exception: ' . $e->getMessage() . "\n";
    }

    return $this->_sThisTemplate;
}

I am working with oxid, but I can't get it to make my module work.

This code and the template are not in the same path, but I also don't know how if Smarty has an autoloader which search my whole folder or not.

Does anybody knows what the problem here?

0

There are 0 best solutions below