Thursday 27 September 2012

[SP2010] - Add the Profile Status Notes Control to Master Page

The My Profile Status Notes control that is found on the My Profile page (person.aspx) can easily be added to your custom Master Page using SharePoint Designer 2010.


In my example below I have added the Status Control to the header section on my custom Master Page, but this can also be added to any Page Layout that you use on your site. 


The Status Control is a Server Control that needs to be registered on your Master Page before you can use the control.  Once registered you can add the control tag to your Master Page and use the CSS to style the default look and feel of the Status Control if you wish.  Follow the instructions below to implement this functionaly:

1. Open your site in SharePoint Designer 2010 and edit your Master Page in Advanced Mode.


2. Add the sample code below to the top of your Master Page to register the Server Control.


 <%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>  


3.  Add the Status Notes Control tag to your Master Page.

 <SPSWC:StatusNotesControl runat="server"/>  


4. Save the  CSS styles below in a .css file and store it in your Style Library. Once done, reference the CSS file used by your site by navigating to Site Settings - > Master page.


Note that a reference can also be added to your Master Page in SharePoint Designer to reference the CSS file.

No comments:

Post a Comment