Add custom Site Title link to homepage of site to a SharePoint Master Page
How to include the title of the current site in a Master Page that links to the homepage of the site when clicked:
<a href=”<% $SPUrl:~site/ %>” runat=”server”><SharePoint:ProjectProperty Property=”Title” runat=server” /></a>
Details:
- <% $SPUrl:~site/ %> is added to the href attribute of the link, which links to the homepage of the current site. the <a> tag will need to include the runat=”server” attribute for the link to be generated.
- <SharePoint:ProjectProperty Property=”Title” runat=server” /> is included as the anchor text for the link, which will display the title of the current site.
When this is included in a Master Page the link will always contain the title of the current site, and point to the homepage of the current site.
See the full tutorial, which contains additional information and instructions on how to include this in a Master Page for SharePoint 2010. This is also to SharePoint 2007 (MOSS) sites as well.
SharePoint Master Page: Include Title of a Site as a link to the Site’s Homepage
Related posts:
- Restrict SharePoint Content based on Permissions
- Managed Properties Not Populating with Data – Metadata Property Mappings
- Custom Publishing Page Layout using SharePoint Designer
- Create a Custom User Control for SharePoint 2010
- Many SharePoint Branding Resources: Change Site Logo & more using CSS and Masterpages – SharePoint 2010