Interface to manage menus and code-generation to deploy them into your application.
Please download using ONE of the following methods:
All requirements are automatically downloaded into the correct location when using composer. There is no need to download additional files or set paths to third party files.
Get composer:
curl http://getcomposer.org/installer | php
Install latest release OR development version:
php composer.phar require cornernote/yii-menu-module:* // latest release php composer.phar require cornernote/yii-menu-module:dev-master // development version
Add the vendor
folder to the aliases
in your yii configuration:
return array( 'aliases' => array( 'vendor' => '/path/to/vendor', ), );
Download the latest release or
development version and move the
menu
folder into your protected/modules
folder.
In addition the following are required:
Add the menu
folder to the aliases
in your yii configuration:
return array( 'aliases' => array( 'menu' => '/path/to/vendor/cornernote/yii-menu-module/menu', ), );
Add MenuModule
to the modules
in your yii configuration:
return array( 'modules' => array( 'menu' => array( // path to the MenuModule class 'class' => 'menu.MenuModule', // The ID of the CDbConnection application component. If not set, a SQLite3 // database will be automatically created in protected/runtime/menu-MenuVersion.db. 'connectionID' => 'db', // Whether the DB tables should be created automatically if they do not exist. Defaults to true. // If you already have the table created, it is recommended you set this property to be false to improve performance. 'autoCreateTables' => true, // The layout used for module controllers. 'layout' => 'menu.views.layouts.column1', // Defines the access filters for the module. // The default is MenuAccessFilter which will allow any user listed in MenuModule::adminUsers to have access. 'controllerFilters' => array( 'menuAccess' => array('menu.components.MenuAccessFilter'), ), // A list of users who can access this module. 'adminUsers' => array('admin'), // The path to YiiStrap. // Only required if you do not want YiiStrap in your app config, for example, if you are running YiiBooster. // Only required if you did not install using composer. // Please note: // - You must download YiiStrap even if you are using YiiBooster in your app. // - When using this setting YiiStrap will only loaded in the menu interface (eg: index.php?r=menu). 'yiiStrapPath' => '/path/to/vendor/crisu83/yiistrap', ), ), );
To see how you can use your menus:
index.php?r=menu
.