Oct 25, 2013

Displaying Site Title, Site Description on the Custom Master Page in SharePoint 2010



Hello,

Recently I got a requirement to add the default site description in the custom master page. But the default placeholder which providing this functionality didn’t work in this case.
Generally the site description can be set @ Site ActionsàSite SettingsàTitle Description and Icon under Look and Feel Section, like this
 

 


The site description looks like below with the default master page (v4.master here) on the home/welcome page.

 
      
 
If you look in to the design of the default master page, the site description will be served by the placeholder called “PlaceHolderPageDescription” .
 
 
 

 
But in the custom master if  you place this div to show the site description , this will not work.
The workaround to this is, add a project property to the custom master where you need to show up the site description, like this
 
<SharePoint:ProjectProperty Property="Description" runat="server"/>
 
In this way you can use these properties in your custom implementations to get the default SharePoint data. Some other properties I am listing here..
Site Title:                   <SharePoint:ProjectProperty Property="Title" runat="server"/>
Site Owner Name:   <SharePoint:ProjectProperty Property="SiteOwnerName" runat="server"/>
Site Url:                     <SharePoint:ProjectProperty Property="SiteUrl" runat="server"/>
 
 Thanks,