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:
ONET.XML
<?xml version="1.0"?>
<Project Revision="2" xmlns:ows="Microsoft SharePoint" xmlns="http://schemas.microsoft.com/sharepoint/" SiteLogoUrl="/_layouts/images/mysite_titlegraphic.gif">
…
</Project>
webtempCustomMSITEHOST.XML
<?xml version="1.0" encoding="utf-8"?>
<Templates>
<Template Name="CustomMSITEHOST" ID="10001">
<Configuration ID="0" Title="CustomMSITEHOST" Description="" Hidden="FALSE" ImageUrl="/_layouts/images/stsprev.png" DisplayCategory="Development" />
</Template>
</Templates>
Person.aspx
<!-- business card -->
<table cellspacing=0 cellpadding=0 width="100%" style='table-layout:fixed;word-wrap:break-word;' border=”1”>
<tr>
<td class="ms-vb ms-announcementtitle ms-profilevaluelarge" id="ProfileViewer_ValueTitleDept">
<SPSWC:ProfilePropertyValue PropertyName="Title" class="ms-profilevalue" runat="server" /><SPSWC:ProfilePropertyCheckValue PropertyNames="Title,Department" runat="server" Text=", "/><SPSWC:ProfilePropertyValue PropertyName="Department" class="ms-profilevalue" runat="server" />
</td>
</tr>
<td class="ms-vb ms-announcementtitle" id="ProfileViewer_ValueOfficePhone">
<span class="ms-profilevaluesmall"><SPSWC:ProfilePropertyValue PropertyName="Office" class="ms-profilevalue" runat="server" /><SPSWC:ProfilePropertyCheckValue PropertyNames="Office,WorkPhone" runat="server" Text=" "/><SPSWC:ProfilePropertyValue PropertyName="WorkPhone" dir="ltr" class="ms-profilevalue" runat="server" /></span>
<td valign=top class="ms-descriptiontext" id="ProfileViewer_ValueAboutMe">
PingBack from http://www.clickandsolve.com/?p=12748
Is there anyway you can zip up your source files and provide a link for us?
Where do I find WebtempCustomMSITEHOST.XML??
An article helpful only to those who already know. Useless for the rest of us though.
To James P --
If you haven't already figured it out, the webtemp file will be in your WSP view (go to View > Other Windows > WSP view -- will appear under your solution explorer if in default area).
Ali,
Great stuff. At first I was afraid this would lose customizations users had made, but apparently that isn't possible!
One question, any recommendations on the private side of My Sites? Is there similar magic to provision new webparts or sites?
I have followed the instructions, however I seem to be missing some steps.
Is there an example solution I can download?
Can i use the feature stappleing method to modify the person.aspx or do I have to use your method to achieve that. Also is there any way to add anothe rpage to mysite what is the way do it feature stappling or the your method.
Will this work with VS 2005? I tried it but no luck.
Hello,
I recently ran across your post which got me to the 80% mark on deploying a custom person.aspx feature.
Using your example, however, when I go to WSP view I seem to be missing Elements section entirely form the view.
Are you able to post the original code so I can see your underlying project structure to see if I have overlooked something extremely simple.
Thanks,
Stephen
When I deploy from Visual Studio and check the newly created SiteTemplates folder, it does not include all the other files such as person.aspx, blog.xsl, etc. The only file that gets copied is the onet.xml within the xml folder. Any reason for this?
I would check the manifest.xml to make sure all the artifacts are included.
Below is my manifest.xml file. Can you provide an example that will include all the necessary mysites files (person.aspx, default.aspx, blog.xsl, etc.)? Thanks!
<Solution SolutionId="1710ca45-8860-4096-822a-e1f5f6ffc588" xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureManifests>
<FeatureManifest Location="SiteProvisioning\feature.xml" />
<FeatureManifest Location="TCMySiteHostSiteElements\feature.xml" />
</FeatureManifests>
<SiteDefinitionManifests>
<SiteDefinitionManifest Location="TCMySiteHost">
<WebTempFile Location="1033\xml\webtempTCMySiteHost.xml" />
</SiteDefinitionManifest>
</SiteDefinitionManifests>
<Assemblies>
<Assembly Location="TCMySiteHost.dll" DeploymentTarget="GlobalAssemblyCache" />
</Assemblies>
</Solution>
Can I just deploy a custom "Person.aspx" via an Element Module?