fenghuilee/yii2-smartyviewer
最新稳定版本:1.0.3
Composer 安装命令:
composer require fenghuilee/yii2-smartyviewer
包简介
The Smarty Viewer integration for the Yii framework 2+
关键字:
README 文档
README
This extension provides a ViewRender that would allow you to use Smarty view template engine.
To use this extension, simply add the following code in your application configuration and web controller:
xxx/config/main.php
return [
//....
'components' => [
'smarty' => [
'class' => 'yii\smartyviewer\SmartyViewer',
//'themeName' => 'basic',
//'cachePath' => '@runtime/Smarty/cache',
//'options' => [
// 'left_delimiter' => '<{',
// 'right_delimiter' => '}>',
//],
],
],
];
XxxxController.php
public function init()
{
Yii::$app->smarty->init();
parent::init();
//other code
}
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist fenghuilee/yii2-smartyviewer "*"
or add
"fenghuilee/yii2-smartyviewer": "*"
to the require section of your composer.json.
Note that the smarty composer package is distributed using subversion so you may need to install subversion.
统计信息
- 总下载量: 84
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-14