- Issue created by @goldin
- 🇩🇪Germany jurgenhaas Gottmadingen
Action plugins, which is what ECA utilises to make things happen, are mostly built to make existing functionality in Core or contrib modules available. They usually don't implement functionality on their own, they re-use existing functionality, and you can think of an action plugin as making such functionality accessible through the UI, or with ECA or other modules that utilise action plugins.
Displaying Drupal messages in popup windows sounds like a requirement for the theme. It would not only have to provide the markup to make that possible but also some sort of JavaScript, since building and displaying a popup needs to be done in the client, i.e. in the browser. So, the server side PHP has no means to get a popup in the browser.
Having said that, if your message appears as a response of a user action in the browser, which is posted to the backend by ajax, there are AjaxCommands in Drupal core that can be sent back to the browser together with the regular server response to the ajax request. Those commands are pretty powerful and some of them even get the browser to show either an alert message or a dialog, either modal or not. With ECA 2.0 we do provide action plugins for those ajax commands, that will allow for really powerful stuff.
In summary, there are 2 categories:
- Showing regular message in a popup: that requires extra javascript provided by a module or the theme, that grabs messages on the page an pushing them into a modal
- Responses to ajax requests can contain commands that get the browser to display modal dialogs, which will be supported by ECA
Does that make sense?
- Status changed to Postponed: needs info
10 months ago 4:12pm 21 February 2024 - Status changed to Closed: outdated
9 months ago 2:03pm 2 April 2024