Custom Admin

For configuring a custom application master page. This solution allows different application master pages to be selected, similar to the way the normal master pages are set for system pages and publishing pages. Master pages can be set depending on SPWeb. Custom Admin allows you to use a to change the master page from the standard application.master. This is mainly for pages in the layouts and admin folders, as other master pages you have control over.

Installation

Run the commands to install and deploy as needed. Or use central admin to deploy. The final command will generate correct navigation after the solution has been deployed.

cd "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\"
stsadm.exe -o addsolution -filename components2.customadmin.wsp
stsadm.exe -o deploysolution -name components2.customadmin.wsp -local -allowgacdeployment -url http://mysharepointsite.com.au
stsadm.exe -o copyappbincontent

Enabling

The nuts and bolts of the component uses a IHttpModule to replace the master page are run time. Enable this per web application as needed. Central administration -> Applications -> Manage web application features.

webapplication.jpg

Configuration

Navigate to a site or web in the web application. A new site settings menu item should be displaying.

sitesettings.jpg

This selection screen is similar to the standard master page selector.

setmasterpage.jpg

Recover

Sometimes you may assign a custom application master page that is incorrect, and causes the site settings page to crash, no allowing you to change back to default. For cases like this, activate the following feature from the command line, to reset the application master page to default.

stsadm.exe -o activatefeature -name CustomMasterPageClear -url http://mysharepointsite.com.au

Future Developments

  • Make the master a inheritable property

Links

Many ideas came from many different sources

http://sharepointmagazine.net/technical/development/customizing-application-master-pages-masterpages-and-sharepoint-part-5-of-6
http://sharepointmagazine.net/technical/development/deploying-the-master-page
http://www.sharepointblogs.com/dwise/archive/2007/01/08/one-master-to-rule-them-all-two-actually.aspx
http://blogs.msdn.com/scaravajal/archive/2007/03/13/sharepoint-branding-and-application-master.aspx
http://weblogs.asp.net/soever/archive/2006/11/14/SharePoint-2007_3A00_-using-the-masterpage-from-your-site-in-custom-_5F00_layouts-pages.aspx

Last edited Mar 17, 2009 at 11:54 AM by djeeg, version 7

Comments

No comments yet.