In MOSS 2007 as part of the SSP provisioning process “SPSMSITEHOST” site definition is being used to provision the MySite host (Root site) which provides access to user profile information through “person.aspx” and “SPSMSITE” site definition used to provision a personal site collection for each individual user.
One thing to consider is while each user owns a seperate site collection as personal site, MySite host is shared among all users and changes to “Person.aspx” will affect all users. Feature Stapling is my method of choice for customizing or extending the OOB “SPSMSITE” features as explained in this great post by Steve Peschka. As for customizing the MySite host, in most cases changes should be applied directly to “Person.aspx” file or the related "ONET.XML”. As best practice it is always recommended not to modify the OOB site definitions and although SharePoint Designer can be used to apply changes to “Person.aspx”(which leaves the page as un-ghosted) in scenarios where changes should be deployed from one environment to another (e.g. from Development to QA and eventually Staging and Production) leveraging a custom site definition wrapped in a solution package is a better approach.
Following explains the steps to create and deploy a custom MySite host site definition based on the OOB “SPSMSITEHOST” site definition using Visual Studio 2008 extensions for Windows SharePoint Services v 1.3 and STSADM command:
- Create a new project using “Blank Site Definition” template
- In VS 2008 copy over “ONET.XML”, “Person.aspx”, “Default.aspx”, “Discussion.aspx” and “Blog.xsl” files from “12\Templates\SiteTemplates\SPSMSITEHOST” folder under “CustomMSITEHost"\Site Definition”
- Make sure to add the required namespaces to the <Project> element in the new “ONET.XML” file and change other sections if required
- Change the “ID” value from 1 to 0 in “WebtempCustomMSITEHOST.XML” so it references the default configuration in “ONET.XML”
- Modify the “Person.aspx” file (In this example a border attribute is added to the html table for “Business Card” section)
- Switch to WSP view and make sure that all the elements and files included in solution package
- From “Solution Explorer” tab, build and deploy the package
- Confirm that the solution package has been deployed successfully, at this point "My Profile" information should be displayed via OOB “Person.aspx”
- Delete the root MySite host site collection and provision a new site collection based on the custom template (i.e. CustomMSITEHost)
- Refresh the profile page and notice the change