Branding My Sites & Person.aspx in SharePoint 2010
While at SharePoint Conference 2011 last week in Anaheim, California, I was asked to participate as the SharePoint Branding Expert at the “Ask the Experts” event. I was asked a few questions that required code to better explain. I already provided code on a fixed footer in SharePoint 2010. Another question came up regarding SharePoint Branding and My Sites. Below I provide some guidance on a way to modify person.aspx in the My Sites site collection.
One of the conference attendees was having difficulties with the layout in their My Sites person.aspx page that loads the public profile of their employees. In particular they wanted to add content or a web part that could not be modified by the end user. What I suggested was simply adding a web part directly into the person.aspx page using SharePoint Designer.
Opening My Sites site in SharePoint Designer
My Sites in SharePoint 2010 is just like any other site in SharePoint, meaning that if you have the correct permissions set up, you can open your My Sites site collection in SharePoint Designer. Once you do this, look in the Navigation Bar under All Files. In the root of your My Sites folder you will see a few aspx pages. The public profile for each of your users is defined by the person.aspx page by default. Open person.aspx and then in Code View, click on Advanced Mode found in the Ribbon, in the Editing section.
Now you can go ahead and update the person.aspx page as required. I have two quick ideas.
Add a web part outside of a web part zone.
Automatically add a web part to a web part zone
Adding a web part to a web part zone in the person.aspx would make it much easier for an administrator to modify or remove the web part via the web browser. This may or may not be a problem, that is up to you.
The outcome of the two different techniques in my examples would produce a very similar outcome from the perspective of those that visit someone’s Profile page.
There is a catch that you will want to be aware of. This method requires you to add the webparts to the Master Page itself so the account you are using to modify the masterpage would require the proper permissions to write to this file. Along this same line, since you are modifying the Master Page, all users would see the same web parts, you could not use this technique to allow each user to modify the web parts on their profile page.
How have you modified your My Sites site collection? Or what are you trying to do? Please tell me, I and others would like to know.