Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change Let's see what we have here to breadcrumb trail


Steven Barkess

Recommended Posts

Hi

 

I have changed "Let's see what we have here" to "Browse" and now want to add in the breadcrumb trail so it reads eg "Browse DVDs"

 

Again I thought I could change the catalog/index.php file but the edits made no difference.

 

I tried changing

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

to

 

<td class="pageHeading"><?php echo $breadcrumb->last(); ?></td>

 

but nothing happened

 

Thanks

 

Steven

Link to comment
Share on other sites

There are 3 places in the index.php file where the HEADING_TITLE constant is called depending on if it is a nested category, product category, or main page. I would recommend changing all 3 instances to PAGE_TITLE and then use this code (place it just below the call to include application_top.php):

if ( sizeof($breadcrumb->_trail) > 1 ){
 define('PAGE_TITLE', 'Browse ' . $breadcrumb->_trail[sizeof($breadcrumb->_trail)-1]);
} else {
 define('PAGE_TITLE', HEADING_TITLE);
}

Link to comment
Share on other sites

Ooops...simple mistake. Use this code instead:

if ( sizeof($breadcrumb->_trail) > 1 ){
 define('PAGE_TITLE', 'Browse ' . $breadcrumb->_trail[sizeof($breadcrumb->_trail)-1]['title']);
} else {
 define('PAGE_TITLE', HEADING_TITLE);
}

The difference is the 'title' element...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...