Module Description
Use Modal to add dialogs to your site for lightboxes, user notifications, or completely custom content.

Just open: Administration » Structure » Modal

Have fun :)

Modal 5 is ready to D10 🍻 Also compatible with Bootstrap 5Enjoy!



With Modal you're able to
* Manage Modal through CMS;
* Customize with CKEditor;
* Select the page(s) to insert your Modal;
* Support for wildcards in url path;
* Display Modal on page-load or clicking in a custom .class or #id;
* Override at runtime with hook_modal_alter();
* Allow custom actions on button with hook_modal_submit();
* Customize Modal Header, footer and buttons;
* Diferent Modal sizes;
* Define roles to view the Modal;
* Export / Import Modal with config management;
* Create Modal programatically with Entity Manager.

For new items and suggestions, feel free to suggest in Modal's issue queue



Hooks available
You're able to update your Modal before display with this code

/** * Implements hook_modal_alter(). */ function PROJECT_modal_alter(&$modal, $modal_id) { $modal->setLabel('Title Updated'); $modal->setBody('Body Updated'); } hook_modal_ID_alter
You're able to update Modal by ID (machine_name) with this example

/** * Implements hook_modal_ID_alter(). */ function PROJECT_modal_ID_alter(&$modal, $modal_id) { $modal->setLabel('New Title'); $modal->setBody('New Body'); } hook_modal_submit
You're able to use Hook Modal Submit and work with Ajax with this example

/** * Implements hook_modal_submit(). */ function PROJECT_modal_submit($modal, $modal_state, $modal_id) { // Your AJAX here. \Drupal::logger('modal_page')->notice('Modal Submit was triggered'); } Insert Modal programmatically
$modal = \Drupal::entityTypeManager()->getStorage('modal')->create(); $modal->setId('modal_id'); $modal->setLabel('Modal Title'); $modal->setBody('Modal Content'); $modal->setPages('/hello'); $modal->save(); Suggestions and Helpers Modal are completely free. Everyone is welcome to help or send suggestions. Feel free to submit your suggestion on the issue queue or buy us a coffee

Help us Buy us a coffee ☕️ Meet the Project Maintainers Renato G. H. (RenatoG) Author|Maintainer

Paulo H. Starling (paulocs) Maintainer

Thalles Ferreira (thalles) Maintainer



Graphic designer Nico Grienauer

(grienauer) Logo author





Modal Documentation See our documentation here and if you liked give us your star ⭐️

Credits


http://www.ciandt.com

Project Usage
2053
Creation Date
Changed Date
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
Modal module aims to solve the need for adding dialogs to websites for lightboxes, user notifications, or custom content, with features such as managing through CMS, customizing with CKEditor, and creating programmatically with Entity Manager.
Data Name
modal_page

OPENAI CHATBOT

OPENAI CHATBOT

19:40:51
Generic Chatbot
Hi, I'm a Drupal module expert powered by OpenAI, answering your questions about the Drupal module ecosystem. How can I be helpful today? Please note that we will log your question.