我有这段代码:
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;
}
我正在使用氧化物,但我不能让它使我的模块工作。
此代码和模板不在同一条路径中,但我也不知道Smarty是否有自动加载器可以搜索我的整个文件夹。
有人知道这里有什么问题吗?