Site Logo link to Root Site Collection in SharePoint 2013

For most users, the Company Logo in the header of a site indicates a link to the Root level Home page of the Site. However, in SharePoint 2013 the SiteLogo snippet provides us with a Clickable Logo that links to the homepage of the current site only. So within a sub-site, the default behaviour would redirect us to the home page of that particular sub-site, and not to the Root Home Page.

To convert the SiteLogo code snippet into the good ol’ fashioned Root Home link that we’re used to, we need to change the “SPSimpleSiteLink” into “SPLinkButton“, which would then allow us to add the appropriate redirect url property to the Site Logo.

1. From the Snippet Gallery, copy and paste the default SiteLogo code snippet into your master page into the appropriate place you want it to be displayed.

2.  In the SiteLogo code, search for SharePoint:SPSimpleSiteLink to find the relevant opening and closing tags. Now simply change the tag names to SharePoint:SPLinkButton instead.

3. Then simply add the attribute NavigateUrl to this tag and set it’s value to “~sitecollection/”.

Example:

Default snippet code:

<!--MS:<SharePoint:SPSimpleSiteLink runat="server" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
... 
<!--ME:</SharePoint:SPSimpleSiteLink>-->

Should become this:

<!--MS:<SharePoint:SPLinkButton runat="server" NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" ID="x7917ecc8c38d4bd69f58e338eab54c8c">-->
...
<!--ME:</SharePoint:SPLinkButton>-->
Advertisement

13 responses to “Site Logo link to Root Site Collection in SharePoint 2013

  1. Pingback: there is only one jones » Changing the URL of the SharePoint Site Icon

  2. Jenny

    Unfortunately this only seems to work for sites with the Publishing feature enabled

  3. Torey Kirby

    I did this and now have an issue creating views in app parts. When I select OK after creating/modifying a view I get 69|pageDirect|owssvr|http://sitecollection.com/subsite/listname …I go back it does create the view, but is there a way to repair?

  4. Pingback: Redirecting the Site Logo to the Root Site Collection

  5. max

    Hi, thank you very much for your post. Should we change this in minimal.master or v4.master?
    Thanks again!

  6. FreddyB

    Just what I was looking for. It worked, thanks!

  7. Cat

    Thank you so much!!

  8. Jeff

    Excellent article! Easy to follow and works like a charm

  9. Hi Sam, this is exactly what I need to do. However, I am using hosted (Sherweb.com) SharePoint 2013 Foundation and can’t find the Snippet Gallery. Is this only part of “publishing” sites? Any suggestions on how to do this otherwise? Thanks!

  10. Pingback: Redirecting the Site Logo to the Root Site Collection | Out of Box Geekery – SharePoint and more…

  11. Pingback: SharePoint 2013 Branding Tips and Tricks |

  12. SonicVader

    Thanks, it worked for me. In step 1 if your are using SPD to edit your master, you actually have to replace the existing logo code with the snippet in the html master.

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 )

Connecting to %s

%d bloggers like this: