Branding to be implemented to the My Sites host template and personal site template to provide an example of a SharePoint user interface. This branding is simply implemented for Pilot purposes and is not a full-fledge, tested, production-ready branded interface.

My site branding was developed as a Feature Staple packaged in Visual Studio 2010. The Global navigation utilized in the My Sites templates loads from a User Control which cannot be modified via master page updates in SharePoint Designer.

The feature staple solution for this customization was built with following components:
  • New user control (XYZMysiteNav.ascx). This user control is copied from existing GlobalNavigation user control. This new control adds reference to a new CSS file and three new <div> tags. The new <div> tags are used to accept placement of the header consisting of three images. New control deployed to web server folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\xyzmysites.
  • A new feature (XYZ.MySiteFeatureStapleXYZMySiteBrand). This feature binds the new user control to the existing user control and is deployed to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\XYZ.MySiteFeatureStapleXYZMySiteBrand.
  • Custom CSS (xyz_mysites.css): This CSS file contains updated styling for the new <div> tags and updates to positioning, colors, and fonts for existing SharePoint IDs and Classes. This CSS is mapped to folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\1033\STYLES for deployment.
  • Custom images: A variety of images used for header, logo, background, and webpart titles referred to in above CSS file. The images are mapped to folder C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES\xyzpilot for deployment.
  • Feature Staple (XYZ.MySiteFeatureStapleXYZMySiteStaple). Feature staple is used to staple the feature mentioned above (XYZ.MySiteFeatureStapleXYZMySiteBrand ) to the Personal Site (SPSPERS) and the My Sites Host (SPSMSITEHOST) site templates and is deployed to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\XYZ.MySiteFeatureStapleXYZMySiteStaple.

The above solution is packaged into a SharePoint solution file ($safeprojectname$.wsp) and deployed to the web application hosting my sites where it is activated on the My Site Host site collection.

Through feature stapling, the feature is automatically enabled on new personal sites which are created but for all existing sites, the feature has to be activated by running the script below from the SharePoint PowerShell Command prompt on the WFE server (brandpersonal.ps1 powershell script can also be found at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\xyzmysites):

$personalSites = get-spsite | where {$_.RootWeb.WebTemplate -eq "SPSPERS"}
foreach ($site in $personalSites) {Enable-SPFeature -Identity "MyNewNavFeature" -Url $site.Url}

Last edited Oct 16, 2010 at 6:46 PM by Edbob, version 3

Comments

No comments yet.