davidjeddy/yii2-article-category
最新稳定版本:0.0.3
Composer 安装命令:
composer require davidjeddy/yii2-article-category
包简介
Multi level article category module
关键字:
README 文档
README
Extention module for https://github.com/trntv/yii2-starter-kit article & article category system. Adds the ability to create a n+1 level navigation system of article categories.
Install
Recommended way is with Composer.
- Run
composer require davidjeddy/yii2-article-categoryon the terminal in your {project root}. - OR add
"davidjeddy/yii2-article-category": "dev-master@dev"to your projectscomposer.jsonand unpdate. - Enbable the module in your apps config/web.config module list
$config = [ 'modules' => [ ... 'article-category' => ['class' => 'davidjeddy\articlecategory\Module'], ... ], ];
DB Migration
- cd
{project root} php ./console/yii migrate/up --migrationPath=@vendor/davidjeddy/yii2-article-category/migration
CRUD form fields
- Add a input field for the attribute 'order' to the article category CRUD form
- Follow the directions to get
trntv/yii2-file-kitinstalled and working properly - Add the CRUD form field element for thumbnail
echo $form->field($model, 'order')->widget( \trntv\filekit\widget\Upload::className(), [ 'url' => ['/file-storage/upload'], 'maxFileSize' => 5000000, // 5 MiB ]);
See ./docs/ArticleCategory.php for an example of the altered article-category model See ./docs/_form.php for example of CRUD form
TODO
0.0.X : Add logic to display categories AND article per navigation level on each VW
统计信息
- 总下载量: 109
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-10-07