This is how to make your logo clickable!

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
hmmurdock
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Nov 21, 2007 2:04 am

This is how to make your logo clickable!

Post by hmmurdock » Sat May 10, 2008 9:27 pm

I havent found any help on this yet, and just figured it out. Glad to share with everyone else!

To make your logo clickable to take you back to the homepage, this is what you must do:

1- Create a BLANK TRANSPARENT image the exact same size as the included mw_joomla_logo.png file (templates/rhuk_milkyway/images/mw_joomla_logo.png). A .gif or .png will work for the transparency.

2- Save that Image and call it whatever you want. For this purpose, I called mine foreground-blank-logo.png

3- Place that image on your server in the /templates/rhuk_milkyway/images/ directory I showed above.

4- Open the templates index.php file and go to the div id=logo section. Change to code to match below (change filename below to match your blank file)

Code: Select all

<div id="logo">
                        	<a href="../../">
                            <img src="../../templates/rhuk_milkyway/images/foreground-blank-logo.png">
                            </a>
                                                </div>
Viola, you are done!

... Hopefully ;)
Last edited by Robin on Sun May 11, 2008 11:07 am, edited 1 time in total.
Reason: all caps subject removed

User avatar
Mr C
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sun May 04, 2008 10:38 am

Re: This is how to make your logo clickable!

Post by Mr C » Sat May 10, 2008 10:23 pm

If you do not mind a little javascript you can use the following:

<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='<?php echo $this->baseurl ?>'" onmouseout="this.style.cursor='default';"></div>
Mr. C
Something Good Is Going To Happen Today

hmmurdock
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed Nov 21, 2007 2:04 am

Re: This is how to make your logo clickable!

Post by hmmurdock » Sat May 10, 2008 11:45 pm

I havent given it a try, but that sounds like a much better solution. Could it be used on any template and always apply to whatever the logo div is(or modified to reflect actual logo div) ?

Thanks!

ARC_Admin
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun May 04, 2008 3:40 pm

Re: This is how to make your logo clickable!

Post by ARC_Admin » Tue May 13, 2008 9:24 pm

Hey, Mr C. That works!! Thanks very much.

Cheers,
ARC_Admin

User avatar
fionaby
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 163
Joined: Fri Jul 27, 2007 2:03 pm
Location: South Africa - Cape town

Re: This is how to make your logo clickable!

Post by fionaby » Sun Jun 22, 2008 2:01 pm

Wow that was real easy thanks you are the best!

ARC_Admin
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun May 04, 2008 3:40 pm

Re: This is how to make your logo clickable!

Post by ARC_Admin » Sun Jun 22, 2008 2:18 pm

FYI - interesting thing. I found that this does NOT work in Firefox. I does work in IE.

ARC_Admin

User avatar
fionaby
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 163
Joined: Fri Jul 27, 2007 2:03 pm
Location: South Africa - Cape town

Re: This is how to make your logo clickable!

Post by fionaby » Tue Jun 24, 2008 10:13 am

Just tested with Firefox ver 3 and it also does not work? What now any help or suggestions?

User avatar
Mr C
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sun May 04, 2008 10:38 am

Re: This is how to make your logo clickable!

Post by Mr C » Wed Jul 02, 2008 3:05 pm

I am using Joomla 1.5 and I just tried it in Firefox 2.0.015 and 3.0 as well as IE 7.0.6000.16681 with both Windows XP and Vista, and it works for me.

All I did was open /templates/rhuk_milkyway/index.php and replaced

<div id="header">
<div id="header_l">
<div id="header_r">
<div id="logo"></div>
<jdoc:include type="modules" name="top" />
</div>
</div>
</div>

with

<div id="header">
<div id="header_l">
<div id="header_r">
<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='<?php echo $this->baseurl ?>'" onmouseout="this.style.cursor='default';"></div>
<jdoc:include type="modules" name="top" />
</div>
</div>
</div>

Hopefully this helps. If not then maybe someone else can explain why.
Mr. C
Something Good Is Going To Happen Today

User avatar
fionaby
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 163
Joined: Fri Jul 27, 2007 2:03 pm
Location: South Africa - Cape town

Re: This is how to make your logo clickable!

Post by fionaby » Thu Jul 03, 2008 12:01 pm

Thanks will try this. Does your breadcrumb trail work in firefox?

ARC_Admin
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun May 04, 2008 3:40 pm

Re: This is how to make your logo clickable!

Post by ARC_Admin » Thu Jul 03, 2008 12:27 pm

Hmmm, this still does not work for me in Firefox 2 or 3, yet it works great in IE. I wonder if there is a browser setting which might affect this, or possibly a Joomla configuration option. Here is a snip from my modified index.php:

Code: Select all

<div class="center" align="center">
	<div id="wrapper">
		<div id="wrapper_r">
			<div id="header">
				<div id="header_l">
					<div id="header_r">
						<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='<?php echo $this->baseurl ?>'" onmouseout="this.style.cursor='default';"></div>
						<jdoc:include type="modules" name="top" />
					</div>
				</div>
			</div>

ARC_Admin

User avatar
fionaby
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 163
Joined: Fri Jul 27, 2007 2:03 pm
Location: South Africa - Cape town

Re: This is how to make your logo clickable!

Post by fionaby » Thu Jul 03, 2008 12:38 pm

Yes tried that and agree does not work in fire fox 3.0

cbos
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Jun 26, 2008 9:08 pm

Re: This is how to make your logo clickable!

Post by cbos » Sat Jul 05, 2008 12:13 pm

I was just trying to do the same thing, but I was wondering if :<A HREF=../../>etc</A> could be included around the actual logo image instead. I couldn't find the code: <img src=""> for the actual logo. Does anyone know where it is?

Thanks.

ARC_Admin
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun May 04, 2008 3:40 pm

Re: This is how to make your logo clickable!

Post by ARC_Admin » Sat Jul 05, 2008 1:23 pm

cbos,

Let's not hijack this thread, but if you are looking to replace the Joomla! logo with your own, then look in folder your-html-home/templates/rhuk_milkyway/images and replace the file named mw_joomla_logo.png with your own logo. Be sure to make yours the same general size or it may not work.

ARC_Admin

cbos
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Jun 26, 2008 9:08 pm

Re: This is how to make your logo clickable!

Post by cbos » Sat Jul 05, 2008 2:13 pm

I've done that, but I want to place <A HREF=../../>etc</A> around the img src code.

chillbeast
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jul 24, 2008 5:55 pm

Re: This is how to make your logo clickable!

Post by chillbeast » Fri Jul 25, 2008 3:19 am

I used the following code to make it so clicking my logo always returns you to the front page:

<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='http://yourdomainhere.com'" onmouseout="this.style.cursor='default';"></div>

User avatar
fionaby
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 163
Joined: Fri Jul 27, 2007 2:03 pm
Location: South Africa - Cape town

Re: This is how to make your logo clickable!

Post by fionaby » Fri Jul 25, 2008 9:41 am

Thanks let me try that.....

ARC_Admin
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun May 04, 2008 3:40 pm

Re: This is how to make your logo clickable!

Post by ARC_Admin » Fri Jul 25, 2008 5:32 pm

That last version works for me in IE as well as Firefox. thank you!

ARC_Admin

Stasys
Joomla! Ace
Joomla! Ace
Posts: 1318
Joined: Wed Aug 17, 2005 11:06 pm
Location: Lithuania
Contact:

Re: This is how to make your logo clickable!

Post by Stasys » Wed Sep 03, 2008 11:58 am

how this solution works when you put mouse cursor on logo, can you see where you'll go if you click on it ???
Lithuanian Joomla! Community http://www.lithuanianjoomla.com
lietuviškas Joomla! puslapis, naujienos, straipsniai, forumas, vertimai
always be open source, and be free as freedom

kukujang
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 157
Joined: Sun Mar 30, 2008 2:54 pm

Re: This is how to make your logo clickable!

Post by kukujang » Thu Sep 11, 2008 2:56 pm

ARC_Admin wrote:Hmmm, this still does not work for me in Firefox 2 or 3, yet it works great in IE. I wonder if there is a browser setting which might affect this, or possibly a Joomla configuration option. Here is a snip from my modified index.php:

Code: Select all

<div class="center" align="center">
	<div id="wrapper">
		<div id="wrapper_r">
			<div id="header">
				<div id="header_l">
					<div id="header_r">
						<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='<?php echo $this->baseurl ?>'" onmouseout="this.style.cursor='default';"></div>
						<jdoc:include type="modules" name="top" />
					</div>
				</div>
			</div>

ARC_Admin
Thanks for code :D

dusty750
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Mon Sep 24, 2007 3:21 am

Re: This is how to make your logo clickable!

Post by dusty750 » Mon Sep 22, 2008 1:31 am

What code would I use to make an external link. I want to link to someone else's website when my logo is clicked. (The fellow who was nice enough to let me use his professional photograph for my logo).

webmanoffesto
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Tue Sep 09, 2008 8:18 am

Re: This is how to make your logo clickable!

Post by webmanoffesto » Wed Sep 24, 2008 1:12 pm

http://balazs.haifa.ac.il

It works in IE7 but not in FireFox 3.0.1

I tried changing "Search Engine Friendly URLs-YES" to NO
Still doesn't work

What do you suggest. I really want this to work.

Tom

I copy/pasted:
<div class="center" align="center">
<div id="wrapper">
<div id="wrapper_r">
<div id="header">
<div id="header_l">
<div id="header_r">
<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='<?php echo $this->baseurl ?>'" onmouseout="this.style.cursor='default';"></div>
<jdoc:include type="modules" name="top" />
</div>
</div>
</div>

lmkrenek
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Tue Aug 19, 2008 10:07 pm

Re: This is how to make your logo clickable!

Post by lmkrenek » Fri Nov 07, 2008 7:46 am

chillbeast wrote:I used the following code to make it so clicking my logo always returns you to the front page:

<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='http://yourdomainhere.com'" onmouseout="this.style.cursor='default';"></div>

Thanks a million! Saved me a big headache and even worked for cranky Mozilla. :D

PhelanMoonSong
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Thu Nov 27, 2008 11:47 am

Re: This is how to make your logo clickable!

Post by PhelanMoonSong » Sat Jan 24, 2009 1:59 pm

I'd like to have my Logo link point to a different webpage/site and this works well for that.:

<div

id="logo"onclick="location.href='http://www.indianapolismasqueradeball.com/tickets.h

tml'"; style="cursor: pointer;"><img src="<?php echo $this->baseurl ?>/templates/<?

php echo $this->template?>/images/<?php echo $this->params->get('templateColour');

?>/logo.png" style="border:0;" alt=""/></a>
</div>

But I want it to open in another window/Tab instead of leaving my site...

mgelb
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Fri Jan 23, 2009 7:48 pm

Re: This is how to make your logo clickable!

Post by mgelb » Thu Jan 29, 2009 5:12 pm

Beautiful - thanks so much

joomguy09
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu May 14, 2009 5:43 am

Re: This is how to make your logo clickable!

Post by joomguy09 » Wed May 20, 2009 10:44 am

Thanks! Worked wonderfully! Works in FireFox 3, IE7 (both in Vista) just fine!

User avatar
webpetrol
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Jan 23, 2010 8:58 am

Re: This is how to make your logo clickable!

Post by webpetrol » Sat Jan 23, 2010 10:21 am

I used the following code to make it so clicking my logo always returns you to the front page:

<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='http://www.primetcoaching.com'" onmouseout="this.style.cursor='default';"></div>

Such a good code.I agree with u dear.

timmbod
Joomla! Apprentice
Joomla! Apprentice
Posts: 27
Joined: Sun Dec 27, 2009 5:53 am

Re: This is how to make your logo clickable!

Post by timmbod » Tue Feb 09, 2010 4:04 pm

webpetrol wrote:I used the following code to make it so clicking my logo always returns you to the front page:

<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='http://www.primetcoaching.com'" onmouseout="this.style.cursor='default';"></div>
Sorry to sound thick here but where should I put this code - I can't seem to find the right place...

achilles68
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Apr 24, 2010 1:27 pm

Re: This is how to make your logo clickable!

Post by achilles68 » Mon Apr 26, 2010 2:07 am

I replaced:

Code: Select all

<div id="logo"></div>
<jdoc:include type="modules" name="top" />
</div>
with:

Code: Select all

<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='http://www.aritcles.com'" onmouseout="this.style.cursor='default';"></div>
<jdoc:include type="modules" name="top" />
</div>
Obviously, you would put your URL where I put http://www.aritcles.com. Make sure to keep the ' apostrophes '. Not sure if this is good Joomla practice or not but it works for me! I was having problems when going to other pages then clicking on the logo. It was probably because of my search engine friendly plugins.

indigo1300
Joomla! Apprentice
Joomla! Apprentice
Posts: 29
Joined: Tue Jun 22, 2010 1:46 pm

Re: This is how to make your logo clickable!

Post by indigo1300 » Tue Jun 22, 2010 5:43 pm

Did you ever find the place? I changed it in index.php which is where I thought it went, but I apparently am missing something because it does not make the logo clickable for me.

Edited: After struggling for a bit with it I logged out. Came back later to try again and for some reason it worked (the php generated window.location.href). Something must have been corrupted.
timmbod wrote:
webpetrol wrote:I used the following code to make it so clicking my logo always returns you to the front page:

<div id="logo" onmouseover="this.style.cursor='pointer';" onclick="window.location.href='http://www.primetcoaching.com'" onmouseout="this.style.cursor='default';"></div>
Sorry to sound thick here but where should I put this code - I can't seem to find the right place...

achilles68
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Sat Apr 24, 2010 1:27 pm

Re: This is how to make your logo clickable!

Post by achilles68 » Wed Jun 23, 2010 3:49 am

indigo1300 wrote:Did you ever find the place? I changed it in index.php which is where I thought it went, but I apparently am missing something because it does not make the logo clickable for me.

Edited: After struggling for a bit with it I logged out. Came back later to try again and for some reason it worked (the php generated window.location.href). Something must have been corrupted.
Whenever you make changes, it's probably best to clear your browser cache. In Firefox, you can go to "Tools", "Clear Recent History", check the "Cache" box. When doing this, I also like to check "Cookies" as well.

When you reload the page, you won't be logged in anymore so login and check to see if it worked.


Locked

Return to “Templates for Joomla! 1.5”