I downloaded a minimal master page template from here: http://startermasterpages.codeplex.com/ and created a new master page based on it. Then I set it as default master page in SPD2010.

Everything works as expected except for one thing:

After I click on some links, such as "Add Document", a lightbox pops out displaying an upload page which uses my new custom master page. All the menus and other things I put in my custom master page are there. Ofcourse this isn't the thing I expected. With OOTB master page there wasn't an issue like this.

Could you please help?


2 Answers 2


The content loaded within the SPModalDialog UI ("lightbox" as you put it), loads your full master page. It's basically the same page within the modal window and elements containing the s4-notdlg class are hidden (as SPCloudGuy mentioned). This is the process for hiding any element(s) from your master that you don't want displayed inside the modal window. If you look at the OOTB v4 master you'll see how this is used on the headers, quicklaunch, etc.

Also, it's important to note that if you simply apply your custom master to all sites using SPD you've potentially broken the Search Center. OOTB, the minimal.master is used for Search sites while v4.master is used elsewhere. Just be mindful of that and only assign your custom master to sites that originally used v4.master. There's also some additional exceptions around meeting sites.

The best practice any time you're pushing a custom master to the server is via a solution containing logic to set the right master to the site based on what the site is (ie: on activation all regular sites get customv4.master, search sites get customminimal.master, etc.)


In 2010 there is a css class to hide elements from diaglog boxes, all you need to do is add s4-notdlg to the class.


would become

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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