serhatozles / yii2-htmltemplateintegrator
HTML 模板集成器
v1.1
2014-12-23 20:00 UTC
Requires
- bower-asset/jquery-textcomplete: 0.3.*
- kartik-v/yii2-helpers: dev-master
- serhatozles/yii2-simplehtmldom: dev-master
This package is not auto-updated.
Last update: 2024-09-24 03:40:07 UTC
README
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一
php composer.phar require --prefer-dist serhatozles/yii2-htmltemplateintegrator "*"
或
"serhatozles/yii2-htmltemplateintegrator": "*"
将以下内容添加到您的 composer.json
文件的 require 部分中。
此扩展的作用是什么?
此扩展可以帮助您将 HTML 模板集成到 Yii2 中。
只需一键,您的资产和布局文件即可准备就绪。
属性
- 资产
- 布局
- 控制器
- 操作
它将创建所有这些。
用法
首先,您需要将模板文件夹放入 @app/template。
并将以下内容添加到 @app/config/main.php 中
'controllerMap' => [
'integrator' => [
'class' => 'serhatozles\themeintegrator\Controller',
]
],
示例
/frontend
/frontend/template
/frontend/template/yourtemplate
/frontend/template/yourtemplate/css
/frontend/template/yourtemplate/image
/frontend/template/yourtemplate/...
/frontend/template/yourtemplate/index.html
/frontend/template/yourtemplate/...
然后,打开到 web "integrator/define"
就这样。