Hello,
I want to extend the btn-group from the layout_navbar_button_bar function inside the layout_api.php.
How would I go about that, I dont really want to add some jQuery to append new buttons, is that the only way?
Plugin Layout Hook for Btn-Group
Moderators: Developer, Contributor
Re: Plugin Layout Hook for Btn-Group
There is no event triggered in this function and there is no option similar to $g_main_menu_custom_options used in this function.
So there is no other way at the moment than to change the function or to use JavaScript.
So there is no other way at the moment than to change the function or to use JavaScript.
-
- Posts: 31
- Joined: 18 Jun 2019, 08:35
Re: Plugin Layout Hook for Btn-Group
I used JavaScript / Jquery now but I hate how when the page is first loaded you can see two buttons before the rest is loadedeconsor_ag wrote: ↑18 Jun 2019, 08:41 Hello,
I want to extend the btn-group from the layout_navbar_button_bar function inside the layout_api.php.
How would I go about that, I dont really want to add some jQuery to append new buttons, is that the only way?
I would still appreciate any kind of advice / help.
Re: Plugin Layout Hook for Btn-Group
These are your options
- Change function layout_navbar_button_bar
- Send a Pull Request on https://github.com/mantisbt/mantisbt which implements a hook, use the hook in your plugin
- Send a Pull Request on https://github.com/mantisbt/mantisbt which implements a configuration option similar to $g_main_menu_custom_options, use it in your config_inc.php