1

I am currently able to popup a modal window in DNN with dnnModal.show(Url, ...);.

When I view the Url (a page within the DNN website) as a separate page, everything looks as expected (all framework and custom CSS styles apply). When I view the Url in that popup window, all the CSS is gone.

I think the fact that the Url can be anything (even outside the domain) may answer why we lose the "local" CSS. Is there a way to "retain" the website's skin on what shows up on the popup if the Url is within the site?

As an aside question, is there a proper way to load a DNN module on a popup - not the Url as above (because that is actually the Url of the DNN page that the module was put on)? If possible, that might take care of the missing CSS problem.

Mickael Caruso
  • 8,721
  • 11
  • 40
  • 72

1 Answers1

5

You might want to take a look at the way &popup=true works in DNN6/7. If you pass &popUp=true as a querystring parameter (use ? if it is the first) DNN will load the popup.ascx skin from your SKINS folder, if you don't have a popup skin defined in your skin folder, it will use the default dnn one, I believe in darkknight/popup.ascx

You can then define what popup.ascx consists of

Chris Hammond
  • 8,873
  • 1
  • 26
  • 34
  • I do exactly that - the &popup=true. From what I read, the Url is really loaded onto an IFrame, but I still think that what shows in that IFrame would be exactly what I would see when loaded as a full page - which it (the IFrame) doesn't. I'm using DNN7, and I see a popUpSkin.ascx in _default whose content doesn't look like an html layout, but it has the contentPane div in it. I'm not sure if there's anything in popUpSkin.ascx I could do to resolve my issue. – Mickael Caruso Mar 20 '13 at 18:48
  • the case is sensitive for popUup, you can also try loading that outside of the popups all together to make sure you get the styling you want before they are loaded into the iframe – Chris Hammond Mar 20 '13 at 18:58
  • 1
    Thanks - this worked for me - my custom skin did not have a popUpSkin so I copied the 3 files from the core and now it does apply my skin.css to popups – Rodney May 05 '13 at 02:53
  • 1
    Worked, here is the complete url: Portals\_default\Skins\_default\popUpSkin.ascx – Matteo Conta Apr 10 '14 at 08:54
  • the file should be named `popUpSkin.ascx` (`popUp.ascx` didn't work) – roman m Feb 03 '23 at 01:23