This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Is it possible to extend another plugin's navigation?
I've added comment functionality to the RainLab blog plugin and want to add a comment moderation section in the backend. Logically it makes sense to show this on the existing blog navigation submenu, rather than having to create a new main menu item.
Any pointers?
Ok, I dont know if that works, but you could try to paste this to your Plugin.php: https://github.com/rainlab/blog-plugin/blob/master/Plugin.php#L30-L57 and then extend the sideMenu array. You jsut need to make sure , that your plugin is loaded after the rainlab one. No warranties.
Yeah I'd thought of something similar and have just tried it but it loads another blog menu along the top. That might be a plugin order thing. Is it possible to set the plugin load order?
My only other thought is to customise the RainLab plugin and disable updates? Not ideal but should work.
Yes, it is possible.
Try this :)
public function boot()
{
Event::listen('backend.menu.extendItems', function($manager)
{
$manager->addSideMenuItems('RainLab.Blog', 'blog', [
'comments' => [
'label' => 'Comment',
'icon' => 'icon-comments',
'code' => 'comments',
'owner' => 'RainLab.Blog',
'url' => Backend::url('author/pluginname/section')
],
]);
});
}
Last updated
1-6 of 6