Master Pages for Admin and global pages

One of the pains about master pages in SharePoint is that when you set one for a site, it doesn’t apply to the admin pages. This can lead to a, um, interesting difference in appearance.

I started looking into overcoming this. Obviously, there is a fairly straight-forward approach – modify the application.master. Ouch. Then, any changes to design in one file have to be replicated elsewhere, with one file in the Master Page Gallery, and one on the file system.

Alternatively, I found a neat solution at David’s blog. This uses an HTTP Module to reset the master page for any pages looking for application.master.

But after following his instructions, my admin pages wouldn’t work. I just got the error page ‘Unknown Error’.

Digging into the logs, I found what was going on – there were 2 content placeholders that the application.master uses which weren’t on my ‘normal’ master page. Make sure you add place holders for:

<asp:ContentPlaceHolder id="PlaceHolderPageDescriptionRowAttr" runat="server"/>
<asp:ContentPlaceHolder id="PlaceHolderPageDescriptionRowAttr2" runat="server"/>

The full list of placeholders used in both files is:

  • PlaceHolderPageTitle
  • PlaceHolderAdditionalPageHead
  • PlaceHolderBodyAreaClass
  • PlaceHolderBodyLeftBorder
  • PlaceHolderBodyRightMargin
  • PlaceHolderCalendarNavigator
  • PlaceHolderFormDigest
  • PlaceHolderGlobalNavigation
  • PlaceHolderGlobalNavigationSiteMap
  • PlaceHolderLeftActions
  • PlaceHolderLeftNavBar
  • PlaceHolderLeftNavBarBorder
  • PlaceHolderLeftNavBarDataSource
  • PlaceHolderLeftNavBarTop
  • PlaceHolderMain
  • PlaceHolderMiniConsole
  • PlaceHolderNavSpacer
  • PlaceHolderPageDescription
  • PlaceHolderPageImage
  • PlaceHolderPageTitleInTitleArea
  • PlaceHolderSearchArea
  • PlaceHolderSiteName
  • PlaceHolderTitleAreaClass
  • PlaceHolderTitleAreaSeparator
  • PlaceHolderTitleBreadcrumb
  • PlaceHolderTitleLeftBorder
  • PlaceHolderTitleRightMargin
  • PlaceHolderTopNavBar
  • PlaceHolderUtilityContent
  • SPNavigation
  • WSSDesignConsole
  • PlaceHolderHorizontalNav Normal master page only
  • PlaceHolderPageDescriptionRowAttr Admin master page only
  • PlaceHolderPageDescriptionRowAttr2 Admin master page only
Advertisement
Master Pages for Admin and global pages

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.