Search WebmasterHub.net
 
 
 
 
 
 


Article: Add SharePoint Site Title to Master Page - Link to Homepage if clicked

 
Add SharePoint Site Title to Master Page - Link to Homepage if clicked
to include the title of a SharePoint Site in a Master Page, or as content in an aspx page on a SharePoint Site, you can use the "Title" property from the Project Properties available for each SharePoint Site and the ~site url token to link to the homepage of the current site.

<a href="<% $SPUrl:~site/ %>" runat="server"><SharePoint:ProjectProperty Property="Title" runat=server" /></a>



Including <% $SPUrl:~site/ %> as the value of the href attribute for the link will include a link to the root of the the current site.

This can be applied to a Master Page or page in either SharePoint 2007 (MOSS) or SharePoint 2010.

If added to the master page used by a SharePoint site, the link will always display the title of the site when other pages, lists or libraries are being viewed and will link back to the homepage of the current site.



Another project property that is commonly included in a SharePoint master page are the site description:

<SharePoint:ProjectProperty Property="Description" runat=server" />

The title and description displayed will be the same as what is specified in the site settings (Title Description and Navigation) page of each site. If there is no description set for a site, nothing will be displayed where the Description property is placed in the Master Page.

For a full list of the properties available see the ProjectProperty.Property (Microsoft.SharePoint.WebControls) class.

Reference: Include Title of a Site as a link to the Site’s Homepage in a Master Page.
Categories: SharePoint Tutorials | Tips and How Tos
Popularity:
 
Total Views:147
Published:October 3, 2011
 

Members Login
     
 
Username:
Password:
Free Registration
 
     
 
Mailing List
     
 
 
     
 
WebmasterHub.net Blog
 
WebmasterHub.net Resources
     
 
Tools
-Free SEO - Bulk Submit
Tips & Tutorials
-SEO Tips
 
     
Recommended:
 
Home