2

Question regarding Modern Libraries, I wish to open document libraries in a Modal Dialog on a page but have only the library shown, not the Office 365 Suiter bar and left nav. I used the standard SP.UI.ModalDialog.showModalDialog function to open the library in dialog.

All works fine except the usual IsDlg=1 and ms-dialogHidden attributes to hide elements in a Dialog don't work, is there a new way to hide elements?

I am trying to hide to Office 365 suite bar, side bar when in Modal Dialog but it doesn't seem to be working, nor can I use the PnP Core.EmbedJavaScript sample as it doesn't seem to work on modern libraries.

Any help would be greatly appreciated, though I am not a guru in JS so I may be missing something.

0

To hide elements in modal pop up, insert this class in the element that you don't want to have in Modal pop up.

<header id="header" class="s4-notdlg">

Add the class s4-notdlg in the element you don't want in pop up. you will have to append the class in the suitebar and left-nav div, which is in your MasterPage.

Thanks... Hope it will work for you..

  • Hi Ankur, that sadly won't work as it is a modern library in Office 365 where Microsoft doesn't want you to tampering with the MasterPage due to their "evergreen" service. Also from the looks of the HTML the DOM elements are dynamically built with Knockout JS – GroFinJarrydP Oct 7 '16 at 6:04

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.