Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Top green header HOME link help

Top green header HOME link help

Locked

Views: 2,175

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
10 Jul 2009, 11:25 PM
#1
rfresh avatar

rfresh

New Zenner

Join Date:
Jan 2009
Posts:
54
Plugin Contributions:
0

Top green header HOME link help

I want to change the top green bar that says "HOME" to be a link back to my main website. I know what file defines that word HOME but how can I insert an link to my main website? Where would I add the link to my main website that goes with that define label?

Thanks

11 Jul 2009, 1:12 AM
#2
kobra avatar

kobra

Black Belt

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

Re: Top green header HOME link help

You would alter the current link to yours in your template/common/tpl_header.php file

11 Jul 2009, 4:23 AM
#3
rfresh avatar

rfresh

New Zenner

Join Date:
Jan 2009
Posts:
54
Plugin Contributions:
0

Re: Top green header HOME link help

Can you tell me the full path? I can't find template/common

11 Jul 2009, 4:32 AM
#4
rfresh avatar

rfresh

New Zenner

Join Date:
Jan 2009
Posts:
54
Plugin Contributions:
0

Re: Top green header HOME link help

I found the file but where in it would I add the URL link ?

11 Jul 2009, 4:48 AM
#5
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Top green header HOME link help

Be aware that if someone is shopping and uses the home link to look at something somewhere else on your site, he/she could lose his/her session along with everything in the shopping cart.

11 Jul 2009, 5:48 AM
#6
kobra avatar

kobra

Black Belt

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

Re: Top green header HOME link help

rfresh:

Can you tell me the full path? I can't find template/common
rfresh:

I found the file but where in it would I add the URL link ?
While I agree with afo that this is NOT a good idea
Find the following:

<!--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 the highlighted code with your properly formatted html href

Also DONOT edit the core files !! See the tutorials:
https://www.zen-cart.com/tutorials/index.php?article=346
https://www.zen-cart.com/tutorials/index.php?article=232
https://www.zen-cart.com/tutorials/index.php?article=142
https://www.zen-cart.com/tutorials/index.php?article=230

11 Jul 2009, 6:55 PM
#7
rfresh avatar

rfresh

New Zenner

Join Date:
Jan 2009
Posts:
54
Plugin Contributions:
0

Re: Top green header HOME link help

@kobra

That's for the logo isn't it?

I want to add a URL link for the HOME link at the top of the web page, that green bar running across the top of the page.

12 Jul 2009, 7:06 AM
#8
kobra avatar

kobra

Black Belt

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

Re: Top green header HOME link help

You can add another li to the following with some specific name for the "Main" home link and leave the currnt one there and even rename the listinf to be "Store Home" or something that you prefer

Same construction as for logo but look in the same file for this

<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>
12 Jul 2009, 10:22 PM
#9
rfresh avatar

rfresh

New Zenner

Join Date:
Jan 2009
Posts:
54
Plugin Contributions:
0

Re: Top green header HOME link help

That worked - thanks...

25 Jul 2009, 12:34 PM
#10
kobra8 avatar

kobra8

Zen Follower

Join Date:
Mar 2009
Location:
Serbia
Posts:
350
Plugin Contributions:
0

Re: Top green header HOME link help

Hay, i have problem with home link!
In Heder my home link work o.k. byt home link on page have wrong link, dont work good!
Hay to change thet?

https://www.kavanali.com