Project Description
This is Visual Studio project that provides end-to-end branding of sites running in Windows SharePoint Services 3.0 (WSS) and Microsoft Office SharePoint Server 2007 (MOSS).

The SuperBranding project contains several different components
  • feature named SuperBranding
  • feature named SuperBrandingChildSiteInitializer
  • feature named SuperBrandingFarm
  • ASP.NET module named SuperBrandingModule
  • custom application page named BrandManagement.aspx

NOTE: This is a proof-of-concept code sample about how to switch out the master page for built-in application pages such as settings.aspx and it uses a technique involving an HttpModule that is not supported by Microsoft.

Currently, you should extract the zip file with the source code and expand it into a directory named SuperBranding. If you development machine is a single-server farm with WSS 3.0 or MOSS installed, you should just be able to build the project which will run install.bat and install the 3 features and install SuperBranding.dll in the GAC.

The SuperBranding feature can be actviated within any site collection. We have tested it on Blank sites and Team sites. Once you have actviated it within a site collection, you can navigate to the application page named BrandManagement.aspx from a menu item added to the Site Actions menu by a Custom Action. Once you have navigated to the Brand Management page, you can select between one of several different brands (TPG, Litware, Minimal).

The installation of SuperBrandingFarm forces activation which runs an event handler which updates the web.config file to configure an HttpModule module named SuperBrandingModule. This module is what is used to force application pages (e.g. settings.aspx) to use the same custom master page that is used by site pages.

The SuperBranding uses feature stapling to automatically activate the SuperBrandingChildSiteInitializer feature within any child site created within a site collection in which the SuperBranding feature has been actviated. The SuperBrandingChildSiteInitializer feature provides a FeatureActivated event handler that determines what branding settings to set up while a child site is being provisioned.

Once you run install.bat, then you should be able to test the code out. Go to any site collection and navigate to the site collection feature page. Activate the feature with the title of A Sample Feature: Super Branding. Once you activate this feature, the site settings menu should provide a new menu item with a title of Brand Magement. Select this menu item to navigate to BrandManagement.aspx. This page allows you to switch between several available brands.

Last edited Oct 29, 2007 at 3:49 PM by TedPattison, version 5