lucas.sanner54070
lucas.sanner54070

I've created a plugin to extend the User plugin and I now want to add a custom button to the Users toolbar.
I came across an example to add a custom item:

Event::listen('backend.menu.extendItems', function($manager) {
    $manager->addSideMenuItem('RainLab.User', 'user', [
        'export' => [
            'label'       => 'Export',
            'icon'        => 'icon-export',
            'url'         => Backend::url('path/to/your/export/controller'),
            'permissions' => ['rainlab.users.*'],
        ],
    ]);
});

but I can't find anything regarding custom buttons.
How can I do that ?

mjauvin
mjauvin

where do you want the buttons to appear, exactly?

lucas.sanner54070
lucas.sanner54070

Next to the "New user" and "Delete selected" buttons.

mjauvin
mjauvin

You would need to override _list_toolbar.htm as explained here:

https://octobertricks.com/tricks/override-a-controllers-view-file-locally-in-your-plugin

lucas.sanner54070
lucas.sanner54070

Thanks. I think I missed this one.
Great, it works !

1-5 of 5