This will keep "articles" in breadcrumb and add the topic names afterwards, instead of replacing the "articles" root with the topic name and preventing the user from returning to articles once in the topics.
new format:
catalog >> articles>> topic name
old format:
catalog >> topic name
in applications_top.php
FIND:
// add topic names or the author name to the breadcrumb trail
if (isset($tPath_array)) {
for ($i=0, $n=sizeof($tPath_array); $i 0) {
$topics = tep_db_fetch_array($topics_query);
$breadcrumb->add($topics['topics_name'], tep_href_link(FILENAME_ARTICLES, 'tPath=' . implode('_', array_slice($tPath_array, 0, ($i+1)))));
} else {
break;
}
}
} elseif (isset($HTTP_GET_VARS['authors_id'])) {
$authors_query = tep_db_query("select authors_name from " . TABLE_AUTHORS . " where authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "'");
if (tep_db_num_rows($authors_query)) {
$authors = tep_db_fetch_array($authors_query);
$breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
}
}
REPLACE WITH:
// add topic names or the author name to the breadcrumb trail
if (isset($tPath_array)) {
for ($i=0, $n=sizeof($tPath_array); $i 0) {
$topics = tep_db_fetch_array($topics_query);
$breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
$breadcrumb->add($topics['topics_name'], tep_href_link(FILENAME_ARTICLES, 'tPath=' . implode('_', array_slice($tPath_array, 0, ($i+1)))));
} else {
break;
}
}
} elseif (isset($HTTP_GET_VARS['authors_id'])) {
$authors_query = tep_db_query("select authors_name from " . TABLE_AUTHORS . " where authors_id = '" . (int)$HTTP_GET_VARS['authors_id'] . "'");
if (tep_db_num_rows($authors_query)) {
$authors = tep_db_fetch_array($authors_query);
$breadcrumb->add('Articles by ' . $authors['authors_name'], tep_href_link(FILENAME_ARTICLES, 'authors_id=' . $HTTP_GET_VARS['authors_id']));
$breadcrumb->add(NAVBAR_TITLE_DEFAULT, tep_href_link(FILENAME_ARTICLES));
}
}
just this file is included not a full package
More...




LinkBack URL
About LinkBacks









Bookmarks