Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

not clickable link in breadcrumb


jolilola

Recommended Posts

Try this (code from osC 2.3.1). In catalog/includes/classes/breadcrumb.php, find

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="' . $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;
}

and modify to

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']) && $i<$n-1) {  // as a link
	   $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="headerNavigation">' . $this->_trail[$i]['title'] . '</a>';
	} else {  // plain text
	  $trail_string .= '<span class="headerNavigation">' .$this->_trail[$i]['title'] . '</span>';
	}

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

  return $trail_string;
}

Back up the file first, in case something goes terribly wrong.

Link to comment
Share on other sites

  • 4 weeks later...

Archived

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

×
×
  • Create New...