Add new custom button/action button to Mediafinder Toolbar

Hello,

I want to add a custom button to mediaFinder toolbar as

how can i add such a button?

UPDATE:

since the toolbar is hardcoded here

modules/media/formwidgets/mediafinder/partials/_image_single.php

we can override this partial in custom plugin. question is how to override such a file?

Hi,

I feel like this might help.

https://octobercms.com/forum/post/how-to-override-backend-widget-partials

https://octobercms.com/forum/post/backend-extending-the-checkbox-list-partial?page=1

@apinard thanks. both are not working for some reason

@apinard

thanks alot works.

MediaFinder::extend(function ($widget) {
    $widget->addViewPath(plugins_path().'/myVendor/myPlugin/widgets/reportcontainer/partials/');
});
2 Likes