0

I have a team site with 100+ sub sites. On home page there is SharePoint logo in top left corner (the default one). If you click on that logo then it takes user to root site home page. If you are inside a sub site then clicking on that logo takes user to home page of sub site.

What I want is when user clicks in any of the sub site then it should take user to home page of root site. I opened Master Page in SPD and updated hard coded root site URL.

Now when I am on root site home page then clicking on logo takes user to root site home page (which was already working that way). But problem is in sub site logo still takes user to subsite home page. They appear to be using separate Master Pages.

These sub sites are created pro grammatically using template.

How do I fix this issue? Is it possible to run some powershell or some setting in site collection so all sub sites logo take user to root site home page?

2

We can add the following js in the masterpage which will redirect to the site collection/root web url on click of the logo.

<script type="text/javascript">//<![CDATA[
    $(document).ready(function(){
      $("div#DeltaSiteLogo a").attr("href",_spPageContextInfo.siteAbsoluteUrl);
    });
    //]]>
</script>

Reference: Change the subsite Logo URL IN SharePoint

  • All subsites are using different master page (they are all using seattle.master) so I don't think this will work. – Frank Martin Sep 27 '16 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.