Creating a Toolbarbutton which needs a selected list item for dropdown:


or a simple button:

$bar = Toolbar::getInstance('toolbar');
$bar->appendButton('Standard', 'delete', 'delete', 'remove', true);

Is there a way to do the same for a modal button like this, that also only get activated with a selected list item, so it also gets the list-selection class?.

ToolbarHelper::modal('myModal', 'icon-pie', 'myModal');

1 Answer 1


Use popup button:

$bar->popupButton('modalButton', 'myModal')
  • Thanks. Was searching for the modalButton.
    – maidan
    Oct 1, 2022 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.