In Communities, within the template, when you select a Company logo, clicking on the logo will always redirect you back to the communtiy home page. I am trying to figure out how to change this to redirect to a new weblink. Has anyone else ever done this? If so, how did you go about it?
Best Answer
There might be alternatives, but the below appraoch worked for me.
< script > window.onload = function() {document.getElementsByClassName(""logoImage "")[0].addEventListener(""click "",function() {location.href = ""https: //www.google.com""; });}< /script >
This helped to navigate to the external URL. Note: As I am using the www.google.com , this site needs to be add to the CSP trusted sites(Setup> CSP Trusted Sites> new > add the name and the URL that you are using> click save)
You can test this implemented functionality with my community url: https://anu98pcomm-developer-edition.ap16.force.com
I have used this post for Reference