Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pceuropa/yii2-menu
Menu menager, dynamic Yii2 widget. Active menu items
https://github.com/pceuropa/yii2-menu
bootstrap drag drop navbar yii2-extension
Last synced: about 1 month ago
JSON representation
Menu menager, dynamic Yii2 widget. Active menu items
- Host: GitHub
- URL: https://github.com/pceuropa/yii2-menu
- Owner: pceuropa
- License: mit
- Created: 2015-12-13T12:32:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-01-22T21:48:15.000Z (almost 6 years ago)
- Last Synced: 2024-09-30T23:51:02.483Z (about 2 months ago)
- Topics: bootstrap, drag, drop, navbar, yii2-extension
- Language: PHP
- Homepage: https://pceuropa.net/yii2-extensions/yii2-menu
- Size: 74.2 KB
- Stars: 27
- Watchers: 7
- Forks: 18
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Latest Stable Version](https://poser.pugx.org/pceuropa/yii2-menu/v/stable)](https://packagist.org/packages/pceuropa/yii2-menu) [![Total Downloads](https://poser.pugx.org/pceuropa/yii2-menu/downloads)](https://packagist.org/packages/pceuropa/yii2-menu) [![Latest Unstable Version](https://poser.pugx.org/pceuropa/yii2-menu/v/unstable)](https://packagist.org/packages/pceuropa/yii2-menu) [![License](https://poser.pugx.org/pceuropa/yii2-menu/license)](https://packagist.org/packages/pceuropa/yii2-menu)
Bootstrap Menu Builder for Yii2
============================![preview](http://pceuropa.net/images/yii2-menu.png)
[DEMO](https://pceuropa.net/menu/creator)
## 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](https://github.com/RubaXa/Sortable))
* CRUD operations by jQuery Ajax)
## Installation
```
composer require pceuropa/yii2-menu dev-master
```Add the following code to config file Yii2
```php
'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:
```bash
$ php yii migrate/up --migrationPath=@vendor/pceuropa/yii2-menu/migrations```
### 2. Add the following code to view layout file Yii2
```phpuse 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