0

我有这个代码:

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;
}

我正在使用 oxid,但我无法让我的模块正常工作。

此代码和模板不在同一路径中,但我也不知道 Smarty 是否有自动加载器来搜索我的整个文件夹。

有人知道这里有什么问题吗?

4

0 回答 0