“application.extensions.yiiext.renderers.smarty.ESmartyViewRenderer”

送分小仙女□ 提交于 2019-12-12 01:32:58

问题


I have integrated the smarty template to my application as specified here

But I am getting the above error.

I have tried all the possible ways to paste the Yii Smarty parser

Config

'viewRenderer'=>array(
      'class'=>'application.ext.ESmartyViewRenderer',
        'fileExtension' => '.tpl',
        //'pluginsDir' => 'application.smartyPlugins',
        //'configDir' => 'application.smartyConfig',
        //'prefilters' => array(array('MyClass','filterMethod')),
        //'postfilters' => array(),
        //'config'=>array(
        //    'force_compile' => YII_DEBUG,
        //   ... any Smarty object parameter
        //)
    ),

My pleasure to see if any one suggest other(best) template engine..

EDIT

exact error message

Alias "application.extensions.yiiext.renderers.smarty.ESmartyViewRenderer" is invalid. Make sure it points to an existing PHP file and the file is readable.

回答1:


You should try with:

'class'=>'ext.ESmartyViewRenderer', // or application.extensions.ESmartyViewRenderer should also work

The protected/extensions directory is already aliased as ext.




回答2:


Alias "application.extensions.yiiext.renderers.smarty.ESmartyViewRenderer" is invalid. Make sure it points to an existing PHP file and the file is readable.

use the right path in the above case.

application.extensions.ESmartyViewRenderer

If you extract your file inside a new folder protected/extensions/smarty instead of protected/extensions then use

application.extensions.smarty.ESmartyViewRenderer


来源:https://stackoverflow.com/questions/13417164/application-extensions-yiiext-renderers-smarty-esmartyviewrenderer

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!