Skip to content

Creating Site Collection Image Link & Site Title Text Link Navigation in SharePoint 2010

by on November 17, 2011

We want to have “normalized” navigation whenever possible. Unfortunately, out of the box, SharePoint navigation can be a bit confusing. Here are the basics for creating a root site logo image link and a site title text link navigation. Making it look good is up to you, but this is a place to start!

Site Collection Image Link

<div class="headerlogo"><SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/"><SharePoint:SiteLogoImage  LogoImageUrl="/Style Library/mytheme/images/logo.jpg" width="218" height="66" title=”Logo Title Text Here" alt="Logo Title Text Here" runat="server"/></SharePoint:SPLinkButton></div>

Site Title Text Link

<div class="headersitetitle"><SharePoint:SPLinkButton runat="server" NavigateUrl="~site/"><Sharepoint:ProjectProperty id="onetidProjectPropertyTitle" runat="server" property="Title" /></SharePoint:SPLinkButton></div>

NOTE: Be careful with returns, as SharePoint will often include “empty text nodes” when rendering controls with returns – it’s hard to read but gives you the proper result.

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: