I left something out of my post on Customizing the staff client login logo that I wanted to be sure to add: Once you’ve changed the logo you may want to change where it links to as well. By default it links to the Koha web site (or the deprecated version if your installation is an older one). We can use a little snippet of jQuery to change that link.
Using jQuery to change the URL to which the staff client logo links
[sourcecode language=’javascript’] $(“#login h1 a”).attr(“href”,”https://www.myacpl.org”);[/sourcecode]
That looks for an <a>
tag inside an <h1>
inside <div id="login">
, which is specific enough to only catch the login form. This snippet goes inside your intranetuserjs system preference. Assuming the only thing you’ve added to intranetuserjs is the code I covered in the previous post, this would be the revised version:
$(“#login h1 a”).attr(“href”,”https://www.myacpl.org”);
});
// ]]>
// <![CDATA[
//
Hi Owen
I replaced the client login logo using css because I have access to the server.
However, to change the link of logo from koha-community.org to my own link I did this:
$(“#login h1 a”).attr(“href”,”http://www.uaar.edu.pk/”);
$(“#login h1 a”).attr(“href”,”https://www.myacpl.org”);
});
// ]]>
// <![CDATA[
// <![CDATA[
And it is not working.
Uh oh, ignore the duplicate lines…
Never mind. This worked:
$(document).ready(function(){
$(“#login h1 a”).attr(“href”,”http://www.uaar.edu.pk/”);
});