Tag Archives: Branding

SharePoint 2010 Mysite Contact Card Customisation


Customise the Mysite contact card section and display custom fields outside of the ‘More information’ drop drop down.


You need to modify the persons.aspx page on the Mysite root. In my case, I took a backup of person.aspx, called it person2.aspx and did tested my customisations first. Once I was happy with it, I replaced person.aspx with the customised version. Note that with this method, you will have to take a back up of your customised file before running any patches or updates to SharePoint as there is a high chance that your customisations will be overwritten with the original file.

  1. Open your Mysite in SharePoint designer and browse to the root directory.
  2. Locate person.aspx and create a copy, name it person2.aspx.
  3. Click on split view so that you can view code and design at the same time.
  4. Locate the div: <div style=”padding-left: 20px;” id=”ProfileViewer_ValueTitle”>
  5. This is where your customisation starts; to add a custom column under Job title, add the line in bold, replacing the red text with the name of your own custom field.

<div style=”padding-left: 20px;” id=”ProfileViewer_ValueTitle”>
<SPSWC:ProfilePropertyValue PropertyName=”Title” runat=”server”/>

<div style=”padding-left: 20px;” id=”ProfileViewer_ValueEmployeeID“>          
         Employee ID: <SPSWC:ProfilePropertyValue PropertyName=”EmployeeID” runat=”server”/>

If you copied the code above exactly, your Mysite contact card will now show as:

  • Name
  • Job Title
  • Employee ID: <User’s employee ID’

You can copy the <div ….. </div> section as many times as you like to add more custom fields.

Thats all for now, cheers.


Comments ( 0 )

Branding: Adding a sticky footer to your SharePoint site


You will to do the following:

  • Modify the CSS styles applied to your masterpage / sharepoint site.
  • Modify the masterpage to apply the custom footer.
Add the following code to your CSS.


Sticky Footer Solution

by Steve Hatcher




* {margin:0;padding:0;}

/* must declare 0 margins on everything, also for main layout components use padding, not vertical margins (top and bottom) to add spacing, else those margins get added to total height and your footer gets pushed down a bit more, creating vertical scroll bars in the browser */

html, body {height: 100%;}

#wrap {min-height: 100%;}

#main {overflow:auto;

padding-bottom: 33px;}  /* must be same height as the footer */

#footer {position: relative;

margin-top: -33px; /* negative value of footer height */

height: 33px;


/*Opera Fix*/

body:before {/* thanks to Maleika (Kohoutec)*/ content:””; height:100%; float:left; width:0;

margin-top:-32767px;/* thank you Erik J – negate effect of float*/ }

Modify your masterpage:


<div id=”wrap”>

<div id=”main”>



<SharePoint:DeveloperDashboard ID=”DeveloperDashboard1″ runat=”server”/>



<div id=”footer”>

<asp:ContentPlaceHolder ID=”Footer” runat=”server”>

<div style=”clear:both; background-color:#808080; color:#fff; padding:10px;”>

&copy; Copyright 2011 Your Company





Comments ( 0 )

Branding: Relative URLS in SharePoint Masterpage

The scenario

You have a bunch of CSS files stored in the Styles Library ofa site collection. Your masterpage references the CSS files in the style library using the following code:

<SharePoint:CSSRegistration name=”Style Library/myCSS.css” After=”corev4.css runat=”server”/>

Everything works fine so you decide to deploy the branding files to another site collection.

After applying the new masterpage, you get an error saying that the masterpage cannot find the CSS files referenced in the masterpage.

The reason for this is because the path defined in the CSSRegistration tag begins with /Style Library. This means that the masterpage will always try to look for the files in http://sharepoint.site/Style Library. To make it look for the files from the root of each site collection, you need to use the $SPUrl token in the file path.

<SharePoint:CSSRegistration name=”<% $SPUrl:~sitecollection/Style Library/myCSS.css %>” After=”corev4.css” runat=”server” />

Comments ( 0 )

Adding a favicon


Change the default sharepoint favicon


Open the masterpage and look for the following line:

<SharePoint:SPShortcutIcon ID=”SPShortcutIcon1″ runat=”server” IconUrl=”/_layouts/images/favicon.ico”/>

Change the IconUrl path to the location of your new icon.

Comments ( 0 )

Branding with site collection feature


We wanted a clean way of deploying masterpages, CSS, images and other branding files cleanly and easily to multiple site collections without the need to modify the files in each site collection whenever something changes.


We used a branding feature that copied the branding files, switched the masterpages, set the logo and favicon, and applied the same branding to all subsites in the site collection.

This guide was incredibly useful as it goes through the steps required to create a basic feature that copies the files, activates the masterpage and applies branding to subsites during activation. When the feature is deactivated, it switches the masterpage back to v4.master.


This was excellent, except that we wanted to go further and make the feature delete the branding files when it was deactivated.

We found another guide that does the trick


Now we have a feature that can be use to enable branding on any site collection with a click of a button! Modifications can also be easily applied to all site collections by updating the feature/solution.

Comments ( 0 )