0

ここで指定されているように、 smarty テンプレートをアプリケーションに統合しました

しかし、私は上記のエラーが発生しています。

ここに画像の説明を入力

Yii Smarty パーサーを貼り付ける方法をすべて試しました

設定

'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
        //)
    ),

誰かが他の(最高の)テンプレートエンジンを提案しているかどうかを確認してください..

編集

正確なエラーメッセージ

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

2 に答える 2

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

上記の場合は正しいパスを使用してください。

application.extensions.ESmartyViewRenderer

protected/ extensionsではなく、新しいフォルダーprotected/extensions/smarty内にファイルを抽出する場合は、 次を使用します

application.extensions.smarty.ESmartyViewRenderer
于 2012-11-16T13:20:22.743 に答える
1

あなたは試してみるべきです:

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

protected/extensionsディレクトリは、既に としてエイリアス化されていますext

于 2012-11-16T13:30:38.490 に答える