Forums / All Other Contributions/Addons / Remove Home Link in Header

Remove Home Link in Header

Views: 2,563

Results 1 to 11 of 11
1 Apr 2012, 10:58 PM
#1
skydivebob avatar

skydivebob

New Zenner

Join Date:
Feb 2009
Posts:
22
Plugin Contributions:
0

Remove Home Link in Header

Site: https://www.daviscomposites.com/store

I can't figure out where the Home Link, "?" on the main page, is controlled... on either the categories tab menu or EZ-Pages Header Bar, not sure. I have both turned off yet still have the question mark on the page...

Were do I go to remove it...

Thanks,
OB

2 Apr 2012, 2:29 AM
#2
gjh42 avatar

gjh42

Black Belt

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

Re: Remove Home Link in Header

Not sure what you mean by "?", but the only Home link I see is the navMain one, which does not have admin control. It is part of the fundamental site navigation and interactive links section (except that one is not interactive. It really ought to be smart, only showing the Home link when appropriate as the login/logout/checkout/etc. links do).
Edit /includes/templates/your_template/common/tpl_header.php (copy it from /template_default/), and change this ```php

<!--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> ``` to this ```php <!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <?php if (!$this_is_home_page) { ?> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li> <?php } ?> ``` If you just want the home link completely gone from that location, just comment out the line like this ```php <!-- <li><?php //echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php //echo HEADER_TITLE_CATALOG; ?></a></li> --> ```
3 Apr 2012, 4:37 PM
#3
skydivebob avatar

skydivebob

New Zenner

Join Date:
Feb 2009
Posts:
22
Plugin Contributions:
0

Re: Remove Home Link in Header

I guess I wasn't clear as to the location of the Home Link on the page... The question mark on the page is the Home Link and it rest at the top left edge of the right column and not at the top of the main header....

https://www.daviscomposites.com/store

Bob:oops:

3 Apr 2012, 9:34 PM
#5
skydivebob avatar

skydivebob

New Zenner

Join Date:
Feb 2009
Posts:
22
Plugin Contributions:
0

Re: Remove Home Link in Header

Here is a screen shot for you to look at... I am working with Safari as the browser.... you can see the blue box with the question mark in it... that is the home link I'm trying to get rid of...

Thanks for all of your help in advance...

Bob

3 Apr 2012, 11:28 PM
#6
gjh42 avatar

gjh42

Black Belt

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

Re: Remove Home Link in Header

Have you tested any other browsers? You need to make sure your site displays in at least the most common browsers (at this point IE(9,8), Firefox, Chrome, not in order).

There is nothing in your HTML source (which is browser-independent) which has a question mark or a home link in that part of the output. There is an empty tagline element, which might be rendered by Safari as a ? symbol; I've never used Safari so have no comment on its behavior. ```html

<!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><a href="http://www.daviscomposites.com/store/"><img src="includes/templates/custom/images/" alt="" /></a></div> <div id="taglineWrapper"> <div id="tagline"><h1></h1></div> </div> </div> <br class="clearBoth" /> <!--eof-branding display--> ```
4 Apr 2012, 1:09 AM
#7
skydivebob avatar

skydivebob

New Zenner

Join Date:
Feb 2009
Posts:
22
Plugin Contributions:
0

Re: Remove Home Link in Header

Where would I find that HTML code... also, the problem appears in Chrome and Safari but not FireFox....

4 Apr 2012, 3:27 AM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Remove Home Link in Header

/includes/templates/your_template/common/tpl_header.php - you will find the output built by a bunch of PHP code. First I would suggest looking at the define:
/includes/languages/english/header.php
Line #21 : define('HEADER_SALES_TEXT', 'TagLine Here');

or your template version:
/includes/languages/english/your_template/header.php

If that is empty (defined as '' ) then it will not be output at all by stock Zen Cart coding. A custom template could have mangled that safeguard so it prints the empty tagline.

4 Apr 2012, 10:55 PM
#9
skydivebob avatar

skydivebob

New Zenner

Join Date:
Feb 2009
Posts:
22
Plugin Contributions:
0

Re: Remove Home Link in Header

OK... I think I found where the link is located... in the logoWrapper. Now I just need help to locate the file to make the fix... see attached html...

4 Apr 2012, 10:57 PM
#10
skydivebob avatar

skydivebob

New Zenner

Join Date:
Feb 2009
Posts:
22
Plugin Contributions:
0

Re: Remove Home Link in Header

Screen shot might be a bit small... here is the code...

<!--bof-branding display--> <div id="logoWrapper"> <div id="logo"><a href="http://www.daviscomposites.com/store/"><img src="includes/templates/custom/images/" alt="" /></a></div> </div>
6 Apr 2012, 3:12 AM
#11
gjh42 avatar

gjh42

Black Belt

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

Re: Remove Home Link in Header

The empty div/h1 is not the logo but just after it, in the tagline section.

But before you edit template files, be sure to look for that define. Clearing that out should resolve itself if the stock functionality is intact. If not, post the whole section of the file between the "branding display" tags in tpl_header.php.