******************安装使用说明******************
 
1. 将压缩包解压内容至\protected\extensions\smarty\文件夹下
2. 需要在config/main.php的components中配置以下组件信息:
 
            //smarty-view-renderer 扩展组件
            'viewRenderer'=>array(
                'class'=>'application.extensions.smarty.ESmartyViewRenderer',
                'fileExtension' => '.tpl',
            ),
 
======================================
在Controller使用时调用方法:

Posted 31 October 2010 - 09:00 AM

}
 
 
======================================

Installation,官方安装说明

  • Extract the release file under vendor/Smarty.
  • Download and extract libs folder contents of Smarty package under protected/vendor/Smarty.
  • Move files from plugins folder to protected/vendor/Smarty/plugins.
  • Add the following to your config file 'components' section:
<?php
// ...
'viewRenderer'=>array(
  'class'=>'application.ventor.Smarty.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
    //)
),

There are some more options on configuring Smarty properties now. Will add documentation soon.

相关文章:

  • 2021-08-29
  • 2021-07-30
  • 2021-11-23
  • 2022-12-23
  • 2021-12-18
  • 2021-06-01
  • 2021-12-21
  • 2022-03-08
猜你喜欢
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2022-02-03
相关资源
相似解决方案