I have a custom Application Page that's using DynamicMasterPageFile="~masterurl/default.master" to get the associated master page. I'd like for this Application Page (and others) to use my custom Master Page that I created using the Design Manager. This master page is stored with the others at [MappedDrive]:/_catalogs/masterpage/custom.master

In Site Settings, I can change the System Master Page to use my custom master page, which in turn will cause my Application Page to use it.

Master page example

However, I don't want all the administrative pages of SharePoint to have my custom site master page, I'd rather have them use seattle to have that native SharePoint feel. I only want the specific application pages that I'm creating to use my custom master page. How can I set the DynamicMasterPageFile attribute to reference my custom master page?

SharePoint 2013 On-premise

  • Open the page in an editor like notepad and change the master page. – Nadeem Yousuf-AIS Mar 9 '15 at 14:13
  • @NadeemYousuf I know how to edit the page, but what URL do I change it to? As a note, ~masterurl/custom.master" will not work. – contactmatt Mar 9 '15 at 14:26
  • After reading the question again and doing some research it appears that it may not be easy to accomplish this. But can you just try to put a copy of the master page in the layouts directory and reference it in the application page like DynamicMasterPageFile="~masterurl/yourcustommaster.master" – Nadeem Yousuf-AIS Mar 9 '15 at 15:24
  • @NadeemYousuf That would be unfortunate, since keeping a separate copy of the master page is obviously duplicating data in different areas. – contactmatt Mar 9 '15 at 15:26
  • 1
    Did you have a look at this post: blogs.msdn.com/b/bgeoffro/archive/2009/06/22/… – Nadeem Yousuf-AIS Mar 9 '15 at 15:28

Your Answer

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

Browse other questions tagged or ask your own question.