startpl / t2cms-blog
嵌套分类,适用于多语言、多域名网站的文章
1.0.0
2020-09-15 13:04 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-26 23:53:23 UTC
README
嵌套分类,适用于多语言、多域名网站的文章
安装
安装此扩展的首选方式是通过 composer。
运行以下命令之一
php composer.phar require --prefer-dist startpl/t2cms-blog "*"
或者将以下内容添加到 composer.json
文件的 require 部分。
"startpl/t2cms-blog": "*"
并将模块添加到后端配置中
'modules' => [ //... 'blog' => [ 'class' => 'startpl\t2cmsblog\backend\Module', ], //... ],
同时,您需要将模块添加到前端配置中
'modules' => [ //... 'blog' => [ 'class' => 'startpl\t2cmsblog\frontend\Module', ], //... ], 'urlManager' => [ 'rules' => [ [ 'class' => 'startpl\t2cmsblog\components\CategoryUrlRule', //'prefix' => 'blog' ], [ 'class' => 'startpl\t2cmsblog\components\PageUrlRule', //'prefix' => 'blog' ], ], ],
然后您应该启动迁移(控制台)
php yii migrate --migrationPath=@vendor/startpl/t2cms-blog/migrations
使用方法
转到后端 /blog/categories 或 /blog/pages
您还可以克隆此仓库以创建您的扩展(例如,商店等)