Forums / General Questions / Link from header image...

Link from header image...

Locked
Results 1 to 12 of 12
This thread is locked. New replies are disabled.
18 Jan 2008, 09:58
#1
brian_flanagan avatar

brian_flanagan

New Zenner

Join Date:
Dec 2007
Posts:
48
Plugin Contributions:
0

Link from header image...

Hi all,

I really didn't want to have to post this question as I'm sure the solution is simple and I've done so much already with very little posting. I've searched the threads and Google, but can't find anything to help.

Basically, I want the header image to link back to the front page of the site when it is clicked on. Where would I do this???

See simple...now who knows the answer?

Thanks in advance :-)

Brian

P.S. The site in question is http://www.imaginart.com.au
18 Jan 2008, 19:58
#3
brian_flanagan avatar

brian_flanagan

New Zenner

Join Date:
Dec 2007
Posts:
48
Plugin Contributions:
0

Re: Link from header image...

Hi Kobra,

Thanks for your reply. I did find that thread when I was searching, but it didn't help as I don't have those lines in my file to edit. I tried adding them in, but it put a Zen Cart logo on top of my image.

Below is how that file looks at the moment.

Brian

?>

<?php
// Display all header alerts via messageStack:
if ($messageStack->size('header') > 0) {
echo $messageStack->output('header');
}
if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
echo htmlspecialchars(urldecode($_GET['error_message']));
}
if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
echo htmlspecialchars($_GET['info_message']);
} else {

}
?>


<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>

<div id="headerWrapper">
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
<ul class="back">
<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
} else {
if (STORE_STATUS == '0') {
?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a></li>
<?php } } ?>

<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo HEADER_TITLE_CART_CONTENTS; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php }?>
</ul>
</div>
<div class="navMainSearch forward"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->

<!--bof-branding display-->
<div id="headerContent">
<div id="nameWrapper"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . STORE_NAME . '</a>' ?></div>

<?php
if (HEADER_SALES_TEXT != '') {
?>
<div id="taglineWrapper"><?php echo HEADER_SALES_TEXT ;?></div>
<?php
}
?>



<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->

</div>
<br class="clearBoth" />
<!--eof-branding display-->

<!--eof-header logo and navigation display-->

<!--bof-optional categories tabs navigation display-->
<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
<!--eof-optional categories tabs navigation display-->


</div>
<?php } ?>

<?php
if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>

<?php } } ?>
19 Jan 2008, 11:05
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Link from header image...

By Default thse exist and are in yours See red highlight:
<div id="headerWrapper">
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
<ul class="back">
<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
<li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
<li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
} else {
if (STORE_STATUS == '0') {
20 Jan 2008, 08:26
#5
brian_flanagan avatar

brian_flanagan

New Zenner

Join Date:
Dec 2007
Posts:
48
Plugin Contributions:
0

Re: Link from header image...

I tried editing the code you indicated, but I still don't get a link (but I don't get the Zen Cart logo like before which is good). The code now looks like this:

<li><?php echo '<a href=" www.imaginart.com.au ">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>


Am I needing to change anything else?

Thanks for your help with this (and patience!).

Brian
20 Jan 2008, 12:58
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Link from header image...

Try this:
<li><a href="www.imaginart.com.au"></a></li>
20 Jan 2008, 19:55
#7
brian_flanagan avatar

brian_flanagan

New Zenner

Join Date:
Dec 2007
Posts:
48
Plugin Contributions:
0

Re: Link from header image...

Nope, still no link :-(

This is what I have now...

<div id="headerWrapper">
<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><a href="www.imaginart.com.au"></a></li>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>
<?php
      } else {
        if (STORE_STATUS == '0') {
21 Jan 2008, 06:13
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Link from header image...

Hover the home link and you will see http://imaginart.com.au - Now paste or type this in your browser aqddress bar and you will see that this address is re-directed to http://imaginart.com.au/shop -

This is controlled somewhere outside of Zen Cart???

Correct this condition and leave the Zen Cart code as you have it now and it will work correctly.
21 Jan 2008, 08:35
#9
brian_flanagan avatar

brian_flanagan

New Zenner

Join Date:
Dec 2007
Posts:
48
Plugin Contributions:
0

Re: Link from header image...

Well that raises a very interesting point that I had not noticed...my Home link has now gone! lol

I went to do what you said, but no Home link. I did notice though that if I move my mouse slightly to the left of 'Log In' there is something there that is linking to http://imaginart.com.au/shop/www.imaginart.com.au (which obviously doesn't exist).

Perhaps I should undo the code change as this may be what removed the Home link?

Also, just to make sure we are on the same page. I'm wanting the header image (the pretty garden scene) to link to the main shop page. I'm aware that the Home link will do this, but was hoping for the image to be the link too.

Oh and yes, I have the redirection set externally at the moment as we may end up having more at this domain, but for now we will just have the shop which is installed at the /shop address.
21 Jan 2008, 08:51
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Link from header image...

Oh and yes, I have the redirection set externally at the moment as we may end up having more at this domain, but for now we will just have the shop which is installed at the /shop address.

Confused as to why you are changing the "Home" link as by default it transfers to the cart main page with the default code...
Also, just to make sure we are on the same page. I'm wanting the header image (the pretty garden scene) to link to the main shop page. I'm aware that the Home link will do this, but was hoping for the image to be the link too.

Can't link a background image...split/slice the image and make a logo.gif and then default code will link it
21 Jan 2008, 08:59
#11
brian_flanagan avatar

brian_flanagan

New Zenner

Join Date:
Dec 2007
Posts:
48
Plugin Contributions:
0

Re: Link from header image...

I wasn't trying to change the Home link. The above changes that you told me to do made it vanish. I just put the code back to the default...

<li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>


...and the Home link is back and working fine.

Oh okay, yeah that's what I was after. Cool, well at least I know that it can't be done unless the whole logo.gif process is followed. May look at that.

Thanks for your help.

Brian
21 Jan 2008, 09:11
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Link from header image...

The above changes that you told me to do made it vanish. I just put the code back to the default...

Didn't vanish when I looked but was un-necessary if you just wanted this to link to the shop home page

Was linked to http://imaginart.com.au without the /shop and why I was discussing the re-direction