Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

$breadcrumb in header.php


eeleek

Recommended Posts

Posted

HI, i noticed the trailer when a user browses the catalog.

my concern is that I do not want <Home> to be there at the track at all. I would like it to start from <Catalog>

 

I looked into header.php and saw

"<?php echo $breadcrumb->trail(' » '); ?>"

 

How can I modify / remove the home (modify to http://www.napogee.com) instead of my hosting companies website which it is currently pointing to !

 

thanks, eeleek.

Ilan`

Posted

in application_top, look for this:

 

// include the breadcrumb class and start the breadcrumb trail
 require(DIR_WS_CLASSES . 'breadcrumb.php');
 $breadcrumb = new breadcrumb;

 $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);
 $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

Change to this:

 

// include the breadcrumb class and start the breadcrumb trail
 require(DIR_WS_CLASSES . 'breadcrumb.php');
 $breadcrumb = new breadcrumb;

//  $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);
 $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));

 

HTH

Noel

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Posted

"In case" You want to add it back later...

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

  • 8 months later...
Posted

All this does is change the display "top >> catalog" to display "catalog", how do you remove it completely from showing up on the index page without removing it from the rest of the subpages?

 

Cheers...

Posted

Change following code in header.php:

 

echo $breadcrumb->trail(' » ');

 

to:

 

if (basename($PHP_SELF) != FILENAME_DEFAULT) {

 

echo $breadcrumb->trail(' » ');

  }

  • 1 month later...
Posted
HI, i noticed the trailer when a user browses the catalog.

my concern is that I do not want <Home> to be there at the track at all. I would like it to start from <Catalog>

 

I looked into header.php and saw

"<?php echo $breadcrumb->trail(' » '); ?>"

 

How can I modify / remove the home (modify to http://www.napogee.com) instead of my hosting companies website which it is currently pointing to !

 

thanks, eeleek.

 

 

all done before:

 

http://www.oscommerce.com/forums/index.php?showtopic=125724

Treasurer MFC

Posted

Go to includes/classes/breadcrumb.php

 

line 31 reads

 

for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) {

 

change it to

 

for ($i=1, $n=sizeof($this->_trail); $i<$n; $i++) {

 

You will keep the rest of the breadcrumb trail but lose the 'Catalog' link.

 

Around 466 of includes/application_top.php rem out the 'Top' link like so

 

//$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

The 'Top' link is now permanently gone from the navigation, while the 'Catalog' link is just hidden by the fact that the trail only starts on the next link you click to.

 

Vger

Posted
Go to includes/classes/breadcrumb.php

 

line 31 reads

 

for ($i=0, $n=sizeof($this->_trail); $i<$n; $i++) {

 

change it to

 

for ($i=1, $n=sizeof($this->_trail); $i<$n; $i++) {

 

You will keep the rest of the breadcrumb trail but lose the 'Catalog' link.

 

Around 466 of includes/application_top.php rem out the 'Top' link like so

 

//$breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

The 'Top' link is now permanently gone from the navigation, while the 'Catalog' link is just hidden by the fact that the trail only starts on the next link you click to.

 

Vger

 

Almost! Only problem is, is it removes the "catalog" link completely which is very useful to get back to the home page. I just don't want that link on index page but everywhere else... Anymore ideas?

 

Cheers

Posted

The link is called from application_top.php and breadcrumb.php, so "No" you can't just remove it from the index page. Problem solved!

 

Vger

Posted
HI, i noticed the trailer when a user browses the catalog.

my concern is that I do not want <Home> to be there at the track at all. I would like it to start from <Catalog>

 

.....

 

All this does is change the display "top >> catalog" to display "catalog"

 

:blink: :wacko: :wacko:

 

The link is called from application_top.php and breadcrumb.php, so "No" you can't just remove it from the index page. Problem solved!

 

Vger

 

Vger is right. That is as close as your gonna get without modifying things that are not worth it for something like this or hiring a php programmer.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...