Features

Screenshots

Menu Items List
Menu Items List
Right-Click Context Menu
Right-Click Context Menu
Create/Update Form
Create/Update Form
View Properties
View Properties
View Examples
View Examples

Installation

Please download using ONE of the following methods:

Composer Installation

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',
    ),
);

Manual Installation

Download the latest release or development version and move the menu folder into your protected/modules folder.

In addition the following are required:

Configuration

Add the menu folder to the aliases in your yii configuration:

return array(
    'aliases' => array(
        'audit' => '/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',
        ),
    ),
);

Usage

To see how you can use your menus: