Search This Blog

Monday, March 23, 2015

Adding users photo to welcome text in Sharepoint 2010

IOTAP’s Sharepoint branding team has helped several customers with applying corporate branding to their Sharepoint sites. Recently during one suchSharepoint 2010 branding exercise, to induce some personilzation touch to the intranet we decided to display the user’s photo before the welcome text.
After tinkering with the Sharepoint 2010 master page controls a bit we were able to find a solution for displaying the user’s photo.

Default Sharepoint 2010 page:
  display_user_image3

Sharepoint 2010 page after applying the user photo:
  display_user_image4

Below are the steps for adding users photo before welcome text

STEP 1:
 Add the following Register tag at the top of the master page (before the doctype element)
<%@ Register Tagprefix="SPSWC" Namespace="Microsoft.SharePoint.Portal.WebControls" Assembly="Microsoft.SharePoint.Portal, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>


STEP 2: Search for"s4-trc-container-menu" and add the following control (before welcome control)

<SPSWC:ProfilePropertyImage PropertyName="PictureUrl" style="float: left; height: 20px;" ShowPlaceholder="true" id="PictureUrlImage" runat="server"/>


The picture display seeting can also be toggeled by changing the ShowPlaceholder setting "true" to "false"



No comments:

Post a Comment