0

I'm building a custom Drupal theme and wondering if there is a way to get the modal windows to use the default admin theme. I'm using the Layout builder module with a custom block that uses the Media Library module and it uses jQuery UI classes.

This is also for the modal content like the media modal.

  • It’s not possible to use two themes in the same request - there would be too much conflict. The only way to do it would be to find a way to load the modal content in an iframe, and make the path of that content use the admin theme. Do bear in mind it opens up permissions issues, as anyone viewing the modals would need ‘Access administration theme’ enabled – Clive Dec 16 '19 at 8:30
  • But as they are logged in as an admin and this is an admin form, I'd assume the permission issue would be null. – Chris Archer Dec 17 '19 at 18:43
0

I think Media Library Theme Reset may be what you're looking for. From the module description:

this module takes on the responsibility of replicating Seven's CSS and attaching it, as a library, in the context of the Media Library, when accessed via Layout Builder.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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