This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

bashar.ayyash
bashar.ayyash

Hi,

I have developed a plugin that extend Rainlab.User plugin which adds a department fields to the user model and the users database, and I managed to add a side menu to Rainlab.User plugin => Users and Departments.

Everything is working fine (functionally) and when I click on departments side menu item I can see the plugin list and I can do CRUD operations but the problem is that there is no side menu any more just the plugin I've developed. The code for my plugin Plugin.php inside boot function:

      Event::listen('backend.menu.extendItems', function ($manager) {
            $manager->addSideMenuItems('RainLab.User', 'user', [
                'users' => [
                    'label' => 'Users',
                    'icon' => 'icon-users',
                    'code' => 'users',
                    'owner' => 'RainLab.User',
                    'url' => Backend::url('rainlab/user/users')
                ],
                'departments' => [
                    'label' => 'Departments',
                    'icon' => 'icon-building',
                    'code' => 'departments',
                    'owner' => 'CPlugin.Staff',
                    'url' => Backend::url('cplugin/staff/departments')
                ],
            ]);
        });

The images:

Users: https://drive.google.com/uc?export=view&id=1YIgbeTD8deeJylCeWvE5qWolssKZxlSM

Departments: https://drive.google.com/uc?export=view&id=1LIM2OoXs9w_KsKu_0AmMMuxrlc0Yj5o4

Thanx for any help,

Last updated

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.