Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bread Crumb and Top Link


sefu

Recommended Posts

Hi All,

Sorry, Bread Crumb seems to be a very common question but I couldnt find a answer.

Right now, when you click on the Top link (mine is called Home) it will take you back to default.php which is the home page.

I have been advised that I need to change this and have it go to the root directly which is the same page.

 

E.G When Home is clicked the link should be www.yourdomain.com where right now it is www.yourdomain.com/default.php

 

Does anyone know how to change the link?

 

Thanks

Link to comment
Share on other sites

Is your site still sitting in the catalog folder or are the files and folders directly in the root directory.

 

Are you using the osc index.php as your home page?

 

If yes to these questions, go to includes/application_top.php.

 

Down near the bottom you will see

 

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

 

if you wish to go directly to the index.php page (also called catalog), you can comment out the 'top tag on the breadcrumb thus

 

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

Link to comment
Share on other sites

Thanks Oblongpeg,

I wasnt too clear so what you posted is not what im after, sorry my bad.

 

All the files are in the root directory and not in a folder.

So if you type in my domain, www,yourdomain.com, you are taken to the home page (thanks to htaccess). The browser will show www.yourdomain.com when you are on the home page

The home page file is default.php (I am using MS1)

 

Now when I click on "Home" in the bread crumb it takes me to www.yourdomain.com/default.php

 

I do not want the default.php bit in the link, I need the link to be coded as only www.yourdomain.com

This will take me to the same page so there is no change for the end user, it is more of a change for the backend.

 

Hope that clears it up

Link to comment
Share on other sites

you set them like

 

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

 

and if you get a page link error in your html_output.php comment out this code (function tep_href_link)

 

	if (!tep_not_null($page)) {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
}

Link to comment
Share on other sites

Thanks.

 

That didnt work but I did this and it worked

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

 

And commented out the tep_not_null bit

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...