cms:onExtendTemplatesToolbar event
The cms:onExtendTemplatesToolbar event allows to add new buttons to the toolbar above the template list (CMS/Templates page) in the Administration Area. The event handler should accept a single parameter - the controller object, which you can use for rendering a partial, containing new buttons. The following example adds a new button to the toolbar.
public function subscribeEvents()
{
Backend::$events->addEvent('cms:onExtendPagesToolbar', $this, 'extend_toolbar');
}
public function extend_toolbar($controller)
{
$controller->renderPartial(PATH_APP.'/modules/cmsext/partials/_toolbar.htm');
}
// Example of the _toolbar.htm partial
<div class="separator"> </div>
<?= backend_ctr_button('Some button', 'new_document', '#') ?>Next: cms:onDeletePartial event
Previous: cms:onExtendPartialsToolbar event
Return to Handling LemonStand events

