Change Link of ERPNext Icon

Hi,

I want to change the link of ERPNext home icon to my custom page, instead of Desktop (desk).

I tried below code on custom.js, its not working, but console.log prints message.

$(document).ready(function(){
  $(".navbar-home").attr("href", "/custom_url");
  console.log("there");
});

You can try by changing in the file
frappe/public/js/frappe/ui/toolbar/navbar.html
Home

1 Like

@PratikMane thanks, let me try.

@PratikMane,

I edited the url there, after that i restarted the bench, but changes not implemented.
code in inspect element is still the same.

Code in file.
<a class="navbar-brand navbar-home hidden-xs hidden-sm myclass" href="/dashboard">

Code in Inspect element.
<a class="navbar-brand navbar-home hidden-xs hidden-sm" href="#">

try this

href=“dashboard

@PratikM34 I Did but still not working, i think changes are not reflecting, because inspect elements shows the # in href tag.

did you run bench build after changing the file ?

@sanjay No, do you want me to do it? i’ve already changed something in css files, would i lost the changes i done in past after bench build i guess?

bench build is required if you making any changes in css/js/html file. You wouldn’t lost changes you did in past.

1 Like

also run bench clear-cache

Done, but past changes to css files lost :smile:
anyways thanks @sanjay :+1: