Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Breadcrumb Trail edit for TOP


JCrews

Recommended Posts

Posted

Since I could not find this solution when I needed it, I figured someone else might like it down the road.

See the detail of osCommerce / catalog / includes / classes / breadcrumb.php

 

 

 

/*

$Id: breadcrumb.php,v 1.3 2003/02/11 00:04:50 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

class breadcrumb {

var $_trail;

 

function breadcrumb() {

$this->reset();

}

 

function reset() {

$this->_trail = array();

}

 

function add($title, $link = '') {

$this->_trail[] = array('title' => $title, 'link' => $link);

}

 

function trail($separator = ' - ') {

$trail_string = '';

 

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

if (isset($this->_trail[$i]['link']) && tep_not_null($this->_trail[$i]['link'])) {

 

 

$trail_string .= '<a href=" ENTER YOUR DOMAIN/LINK HERE' .

 

 

 

$this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';

} else {

$trail_string .= $this->_trail[$i]['title'];

}

 

if (($i+1) < $n) $trail_string .= $separator;

}

 

return $trail_string;

}

}

?>

Posted

Sorry to give false hope on this one....Worked the first time, but I guess due to the session cookies it went all wrong after that...lol

 

Anyway, the easiest solution was just to remove the TOP option from the trail.

 

Did this in the following location: osCommerce/catalog/includes/application_top.php.

(Added the # sign infront of line $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER);

 

// 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));

 

 

 

Again, sorry for the incorrect info first go-round. Its all new. :-)

Archived

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

×
×
  • Create New...