In Drupal 8, with the bootstrap theme when you create a link with class
and data-dialog-type
attributes like the bellow code:
<a class="use-ajax" data-dialog-type="modal"
href="http://drupal.page/front">text
</a>
You will open content of the page in #drupal-modal
element that has these html wrappers:
<div id="drupal-modal" class="modal fade in" tabindex="-1" role="dialog" style="display: block;">
<div class="modal-dialog" role="document">
<div class="modal-content">
This structure is generated in: \themes\bootstrap\js\modal.js
how we can see on the link.
How do I modify it so that I can pass a class name to the #drupal-modal
element from the link a.use-ajax
? The class name text could be value of an attribute of the link.
Specifically I'd like to add modal-lg
or modal-sm
classes or some custom ones.