Forums / Templates, Stylesheets, Page Layout / Change the link in the header image.

Change the link in the header image.

Locked

Views: 2,757

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
4 Mar 2007, 1:36 AM
#1
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Change the link in the header image.

Hi all,

I just can't find where to change the link in the logo image to point to my main site?
I tried a search in the Developer tool kit with different terminology like:
<a href="http://www.example.com/n3dnet" target="_blank"></a>
With different variation but I get no result.
I also peruse the various files where I think this would be but I can seem to locate it.

And its not in the new wonderful book out on Zen Cart.

Thanks. If anyone can help?

PS.: Great book to have it helps a lot with the various possibility and put the Zen in good perspective.

5 Mar 2007, 2:24 AM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Change the link in the header image.

The logo is displayed in /includes/templates/your_template/common/tpl_header.php. The call is built dynamically, so what you see in "view source" never exists as is in the php files.

You can change the link here:```php

<!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?></div> ``` Replace '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' (this looks up your zc homepage) with '<a href="http//www.your_link_domain.com">'
9 Mar 2007, 1:47 AM
#3
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Re: Change the link in the header image.

Sorry it took so long to say thanks gjh42.

Worked like a charm.
One more thing I understand about .php

Thanks again.

19 Nov 2008, 6:04 AM
#4
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: Change the link in the header image.

I am using v1.3.8. This is the code related to the logo in tpl_header.php :

<div class="spacer"><a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>"><?php echo zen_image(DIR_WS_TEMPLATE.'images/logo.jpg'); ?></a></div>

Where would I put the link?

Tooty Fruity

19 Nov 2008, 6:24 AM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Change the link in the header image.

This PHP is evaluated to give the link location:

<?php echo zen_href_link(FILENAME_DEFAULT);?>

So replace that in

<a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>">

to look like

<a href="http//www.your_link_domain.com">
19 Nov 2008, 8:04 AM
#6
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: Change the link in the header image.

Thanks very much for that gjh42. That worked well.

Tooty Fruity

20 Nov 2008, 2:39 AM
#7
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: Change the link in the header image.

is there a way to ad a link to the actual header background image?

Tooty Fruity

20 Nov 2008, 3:15 AM
#8
shoniqua avatar

shoniqua

New Zenner

Join Date:
Sep 2008
Posts:
33
Plugin Contributions:
0

Re: Change the link in the header image.

gjh42:

This PHP is evaluated to give the link location:

<?php echo zen_href_link(FILENAME_DEFAULT);?>

So replace that in

<a href="<?php echo zen_href_link(FILENAME_DEFAULT);?>">

to look like

<a href="http//www.your_link_domain.com">

Hello, would I follow this if I wanted to link my logo which has 3 images inside it for 3 links elsewhere.
I have a shop/blog/website that I want people to click on header and go to those URL's.

Thank you in advance

20 Nov 2008, 3:29 AM
#9
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: Change the link in the header image.

I think if you want multiple links you must float the images over the background header image.

Tooty Fruity

20 Nov 2008, 3:39 AM
#10
shoniqua avatar

shoniqua

New Zenner

Join Date:
Sep 2008
Posts:
33
Plugin Contributions:
0

Re: Change the link in the header image.

demz001:

I think if you want multiple links you must float the images over the background header image.

Thank you

20 Nov 2008, 8:51 AM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Change the link in the header image.

You don't have to have a separate foreground image in order to have a link in a particular location.

You can have a background image, or a logo image with various "buttony" areas, and position transparent <a> elements appropriately with relative or absolute CSS positioning, giving them each a specified height & width as well.

There is no way to link to a background image as such, but you can position a link over a background image.