kwizcom banner advertisement

Change SharePoint 2013 Site Logo Link to Root Site URL

By default, on clicking the SharePoint 2010 or SharePoint 2013 site logo - It takes us to the root of the current site or sub-site. But you may want to link logo to top level site.Well, to change this behavior you got to change the master page.
Important: Since this is a Master page change, You have to apply the updated master page to all site collections for the changes to take effect!

Set SharePoint 2010 logo link root site:
  • Open your Master page in SharePoint Designer 2010, Locate the below line:
<SharePoint:SPLinkButton runat="server" NavigateUrl="~site/" id="onetidProjectPropertyTitleGraphic">
  • Replace the ~site value with ~sitecollection .Save and close the master page (approve and publish, if required!) . This changes SharePoint 2010 logo link to root site collection.
    change sharepoint 2013 logo link URL
In SharePoint 2013 - Change site logo link URL:
  • Open your SharePoint 2013 site in SharePoint designer 2013, Edit the master page in "Advanced Edit Mode",
  • Locate the following code :
<SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=23" runat="server"/>
</SharePoint:SPSimpleSiteLink>
  • Replace the control <SharePoint:SPSimpleSiteLink> with <SharePoint:SPLinkButton> and add the "NavigateUrl="~sitecollection/" attribute to it.Here is the modified code:
<SharePoint:SPLinkButton NavigateUrl="~sitecollection/" CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic" >
<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="/_layouts/15/images/siteIcon.png?rev=23" runat="server"/>
</SharePoint:SPLinkButton >
This changes logo link URL pointing from current site to Root Site!
change sharepoint 2013 logo link to root site
Change SharePoint 2013 Site Logo Link to Root Site URL Change SharePoint 2013 Site Logo Link to Root Site URL Reviewed by Salaudeen Rajack on May 07, 2014 Rating: 5

3 comments:

  1. What about redirecting it to a site page? The site Home page

    ReplyDelete
  2. **In javascript :**

    Using SP Chrome editor, upload a file in style library and script link to this js.
    Edit the JS and add :




    window.onload = function(){
    Var urlLogo = "/sites/xx/xx/xx";
    document.getElementById("ctl00_onetidProjectPropertyTitleGraphic").href = urlLogo;
    }

    ReplyDelete
  3. Thanks for posting this. However, despite following all these steps and editing the master pages on SharePoint Design Manager, I'm still unable to see the changes being applied to the SharePoint site. Any thoughts on what needs to be done additionally? I greatly appreciate your help.

    ReplyDelete

Please Login and comment to get your questions answered!

Powered by Blogger.