Zen Cart Logo
Forums / General Questions / Changing the Home Breadcrumb

Changing the Home Breadcrumb

Locked

Views: 3,605

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
2 Nov 2006, 5:43 PM
#1
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Changing the Home Breadcrumb

I've looked at a couple of posts on this, but I can't seem to find where to change the Home link in breadcrumbs to my own index page. One post said to look for
$breadcrumbs (something something) in my includes/application_top.php, but I could not find it anywhere. Does anyone have a solution for this?

2 Nov 2006, 9:42 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing the Home Breadcrumb

/includes/init_includes/overrides/ini_add_crumbs.php
line 15:```
$breadcrumb->add(HEADER_TITLE_CATALOG, zen_href_link(FILENAME_DEFAULT));

2 Nov 2006, 10:14 PM
#3
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Changing the Home Breadcrumb

That doesn't seem to be working, DrByte. Any other ideas?

3 Nov 2006, 5:12 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing the Home Breadcrumb

what exactly did you put there?
where exactly did you upload it to?

3 Nov 2006, 5:18 PM
#5
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Changing the Home Breadcrumb

I didnt have an ini_add_crumbs.php in my /includes/init_includes/overrides/ folder, but i did have one in my /includes/init_includes/ so I modified that and uploaded it back to init_includes. I changed this:

$breadcrumb->add(HEADER_TITLE_CATALOG, zen_href_link(FILENAME_DEFAULT));

to this:

$breadcrumb->add(HEADER_TITLE_CATALOG, 'http://www.myhomepage.com');

Should I be saving this to the overrides folder?

3 Nov 2006, 5:39 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Changing the Home Breadcrumb

  1. using the overrides folder, of course, is the better practice.

  2. I just did the same as you posted, and it works fine on my test site.

20 Nov 2006, 6:38 PM
#7
lawbird123 avatar

lawbird123

Zen Follower

Join Date:
Sep 2006
Location:
Jacksonville, FL
Posts:
231
Plugin Contributions:
0

Re: Changing the Home Breadcrumb

It's still not working for me DrByte... are you sure there aren't any other files that would need to be modified?

22 Dec 2006, 3:19 AM
#8
bkkbint avatar

bkkbint

New Zenner

Join Date:
Dec 2006
Posts:
3
Plugin Contributions:
0

Re: Changing the Home Breadcrumb

Lawbird123:

It's still not working for me DrByte... are you sure there aren't any other files that would need to be modified?

Anyone else have any ideas on this, because it doesn't work for me either??

  1. the file isn't in the place that Dr. Byte said it was, it's in the place where Lawbird says it was.

  2. I made the changes suggested by Dr. Byte but nothing happened.

Anyone???

1 Apr 2007, 7:54 PM
#9
alex_clarke avatar

alex_clarke

Totally Zenned

Join Date:
Mar 2006
Posts:
909
Plugin Contributions:
1

Re: Changing the Home Breadcrumb

I'm looking to do exactly the same, but haven't got anywhere yet! :(

Anyone have an update on this?

6 Sep 2009, 12:13 PM
#10
mrcctv avatar

mrcctv

New Zenner

Join Date:
Mar 2008
Location:
Joliet, IL
Posts:
4
Plugin Contributions:
0

Re: Changing the Home Breadcrumb

I know this is an old thread but hopefully this helps as I use a CMS program and Zencart is located in a sub directory which creates headaches with using breadcrumbs. :shocking:

The reason why DrBye’s solution above does not work for me ... is located in includes > classes > breadcrumb.php

Find this If statement

// this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
        if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
          $trail_string .= '  <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
        } else {
          $trail_string .= '  <a href="' . $this->_trail[$i]['link'] . '">' . $this->_trail[$i]['title'] . '</a>';
        }

You’ll notice that this statement will override the changes we make in int_add_crumbs.php as long as the title is equal to HEADER_TITLE_CATALOG or “Home”. To overcome this I made this change to breadcrumb.php

// this line simply sets the "Home" link to be the domain/url, not main_page=index?blahblah:
        if ($this->_trail[$i]['title'] == HEADER_TITLE_CATALOG) {
          // $trail_string .= '  <a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . $this->_trail[$i]['title'] . '</a>';
          $trail_string .= '  <a href="' . $this->_trail[$i]['link'] . '">' . $this->_trail[$i]['title'] . '</a>';
        } else {
          $trail_string .= '  <a href="' . $this->_trail[$i]['link'] . '">' . $this->_trail[$i]['title'] . '</a>';
        }

And as per DrByte's post I made these changes to the int_add_crumbs.php

$breadcrumb->add(HEADER_TITLE_CATALOG, '/home');
$breadcrumb->add('Store', '/store');

The reason I’m pointing the home page to “/home” is I’m using a Splash page and the CMS program knows “/home” is not to display the Splash page as “/” will.