I am trying to use Drupal 8's core function to open a page in a modal window. Unfortunately it is very hard to find some official documentation about it, and most of the blogs covering this topic seem to be outdated. But as far as I know, it should be possible to create a modal dialog by adding the following attributes to an a-element:
So that a full example would look like:
<a href="/impressum/lizenzen/43" class="use-ajax" data-dialog-type="modal"> <span class="glyphicon glyphicon-copyright-mark" aria-hidden="true"></span> </a>
Where in my case
/impressum/lizenzen/43 is a path to a views page.
This seems to work, but only when I am logged in as admin. As this does not seem to be an permission problem, I assume it is related to the admin theme (Seven), that might include some core libraries that Bootstrap (the which I use for my site) might not. But oddly enough, in the title bar of the modal appeared, instead of the page title, the string ´Array´, what makes me assume, that an unexpected array to string conversation took place:
- lead me to the official documentation of cores modal API,
- explain to me, what could be the reason that it works as admin only.
- And finally tell me, why on earth an array to string conversation takes place calling a modal?