♥Vger Posted August 29, 2004 Share Posted August 29, 2004 At present the standard osCommerce breadcrumb trail works like this - when you go from the homepage to page 1 it shows Home --> Page1, but when you go from Page 1 to Page 2 it doesn't show Home --> Page 1 --> Page 2, it just shows Home --> Page 2. I would like to change this so that the breadcrumb trail can follow the hierarchy of pages, but don't know how to do this. Can anyone help? Thanks in advance - Vger Link to comment Share on other sites More sharing options...
ccubed_99 Posted March 9, 2005 Share Posted March 9, 2005 It sounds like something was changed. I am getting a full path from the home page. Pages I have located for the breadcrumb trail are the breadcrumb.php and the application_top.php. Have to start somewhere... application_top.php at the bottom of the page... and this is just a guess // 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 its not this then my second guess would be the breadcrumb.php .... just happened to have the pages open as I was thinking it would be nice to apply a different color to the last word in the trail via a span tag from the css... Read, read, read, test, read, read, test, read, implement. Always back up your site and database before changes. Always back up on a regular basis. Link to comment Share on other sites More sharing options...
♥Vger Posted March 9, 2005 Author Share Posted March 9, 2005 Thanks Steve - but that post of mine was 7 months old. I've moved on a bit since then :D Vger Link to comment Share on other sites More sharing options...
sazhig Posted June 20, 2005 Share Posted June 20, 2005 sorry to drag up such an old post, but I am having a similar problem (see my post here) & no-one seems to be able to help - how did you solve yours? Thanks Sarah Link to comment Share on other sites More sharing options...
♥Vger Posted June 20, 2005 Author Share Posted June 20, 2005 You can hardcode it in your root level files (which is what I do), but only for static pages (not default osCommerce cPaths). Or you can use the navigation class - which clears extra links by default (see bold text). Hardcoding example (to go on sub-category page) ---------------------------------------------------------- $breadcrumb->add('Main Category Name Here', tep_href_link(FILENAME_MAIN_CATEGORY));$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_MAIN_CATEGORY2)); navigation coding ----------- CODE if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } The class can be found in catalog/includes/classes/navigation_history.php Vger Link to comment Share on other sites More sharing options...
sazhig Posted June 21, 2005 Share Posted June 21, 2005 navigation coding----------- CODE if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } The class can be found in catalog/includes/classes/navigation_history.php Vger <{POST_SNAPBACK}> No quite with you on this! (OK it flew straight over my head!!) Not very good at this php stuff yet! Do I need to add this code into navigation_history.php? It didn't seem to make a difference. Sarah Link to comment Share on other sites More sharing options...
♥Vger Posted June 21, 2005 Author Share Posted June 21, 2005 Agh sorry - this is something I did a long time ago and have now realised that I've forgotten what changes I did make to that file. If I remember (will try to) I will post it here. Vger Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.