Tuesday, October 25, 2016

Office365 Subsite Logo Redirection

Scenario:
Sub-site logo points to the sub-site's home page by default...and the requirement is to point it to the top level site's.

Solution:
We can not change Master Page in Office365/SharePoint Online site so we need to embed/inject the following JavaScript:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

<script language="javascript" type="text/javascript">

$(document).ready(function () {

    $('#ctl00_onetidProjectPropertyTitleGraphic').attr('href','/sites/Portal');
    $('#ctl00_onetidProjectPropertyTitleGraphic').removeAttr('id');

});

</script>

No comments:

Post a Comment

Official SharePoint Documentation

I have recently contributed to the official SharePoint documentation for developement. Check it out here: https://docs.microsoft.com/en-us...