SharePoint On Prem: how to change link of the logo?

Highlighted
Regular Contributor

Hi,

As everybody knows, the link of the Sharepoint logo points to the start page of the site collection. I need that this link points to another site, say i.e google.com 

I've been trying to do it with jQuery and script  editor but it doesn't seems to run at all. 

I was looking for a powershell solution but I only find how to change the image, I need to change the URL. 

Any ideas? 

Best regards

Americo

 

3 Replies
Highlighted

Hi there,

 

I can't provide exact code as I don't own the license but I can explain how I achieved this.

 

Add in "/SitePages/" this very useful ASPX page from this site: HERE

Add a blank js file wherever you'd like e.g. : /siteassets/jsfile.js

Visit the ASPX page and use the GUI controls to install the script for the site collection

 

Now you have a JS file that runs everywhere in a classic site. You can use the "_spPageConextInfo.webAbsoluteUrl" in js and a switch statement after page load to find the 'a' element in the titleRow area and change its HREF attribute.

 

If there's anything I've brushed over too quickly feel free to drop me any questions. 

 

This also enables you to register scripts site-wide on classic sites. This is extremely useful functionality and opens up lot's of avenues.

Highlighted

Hi there,

 

I can't provide exact code as I don't own the license but I can explain how I achieved this.

 

Add in "/SitePages/" this very useful ASPX page from this site: HERE

Add a blank js file wherever you'd like e.g. : /siteassets/jsfile.js

Visit the ASPX page and use the GUI controls to install the script for the site collection

 

Now you have a JS file that runs everywhere in a classic site. You can use the "_spPageConextInfo.webAbsoluteUrl" in js and a switch statement after page load to find the 'a' element wrapping the logo in the titleRow area and change its HREF attribute.

 

If there's anything I've brushed over too quickly feel free to drop me any questions. 

 

This also enables you to register scripts site-wide on classic sites. This is extremely useful functionality and opens up lot's of avenues.

Highlighted
Thanks. It seems that the likn was always pointing to right place but the site collection wasn’t indexed, after run a re-index everything worked without me doing something else