Menu widget that loads Kartik sidenav widget with database items.
This widget gets from database a group of ordered and hierarchical items and loads them into the Kartik sidevan widget.
Developed by Joseba Juániz (@Patroklo)
This is free software. It is released under the terms of the following BSD License.
Copyright (c) 2014, by Cyneek All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Install Yii 2
Install package via composer
Launch the migration
php yii migrate --migrationPath=@vendor/cyneek/yii2-menu/migrations
The first step is to fill the menu table with a menu structure. This can be achieved with the built-in methods of the MenuItems ActiveRecord:
label (String) (obligatory)
Defines the text that will be shown for this menu item in the SideNav Widget.
url (String) (optional)
The url where the menu item will link in the sidenav.
parent (String) (optional)
Name of the parent menu item. This will create a hierarchical menu.
name (String) (optional)
Name of the menu item, if not defined, will use the label text.
icon (String) (optional)
CSS Bootstrap icon name that will be shown next to the menu item text.
options (String) (optional)
HTML Options that will be added into the menu item.
visible (String) (optional)
If 0, the menu item and all its children won't be shown at the sidenav.
Warning: It deletes the menu item and all its children.
Name of the menu item, that will be deleted.
Warning: This will hide the menu item and all its children.
Options is an array as defined in the Kartik Sidenav Widget Options.
No stable releases.