pceuropa/yii2-menu
最新稳定版本:2.1.4
Composer 安装命令:
composer require pceuropa/yii2-menu
包简介
Menu bootstrap builder. Sort by drag and drop
README 文档
README
Bootstrap Menu Builder for Yii2
Features
- Creating links, drop menus, line (diver) in the navbar-left and/or navbar-right
- Sorting, editing, and deleting using drag and drop
- No jQuery for drag and drop (RubaXa/Sortable)
- CRUD operations by jQuery Ajax)
Installation
composer require pceuropa/yii2-menu dev-master
Add the following code to config file Yii2
'modules' => [ 'menu' => [ 'class' => '\pceuropa\menu\Menu', ], ]
Configuration
1. Create database schema
Make sure that you have properly configured db application component and run the following command:
$ php yii migrate/up --migrationPath=@vendor/pceuropa/yii2-menu/migrations
2. Add the following code to view layout file Yii2
use pceuropa\menu\Menu; NavBar::begin(['brandLabel' => 'Brand','brandUrl' => Url::home(),]); echo Nav::widget([ 'options' => ['class' => 'navbar-nav navbar-left'], 'items' => Menu::NavbarLeft(1) // argument is id of menu ]); echo Nav::widget([ 'options' => ['class' => 'navbar-nav navbar-right'], 'items' => Menu::NavbarRight(1) ]); NavBar::end();
3. Getting started
/menu/creator
统计信息
- 总下载量: 11.92k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 28
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-13