TomCavendish Posted February 22, 2004 Share Posted February 22, 2004 When I view a product details page (catalog/product_info.php/..) the 'Products Model' is displayed in the 'title bar' of the browser window. How do I change this from the 'Product Model' to display the 'Product Name' in the title bar instead? I want to change it to help with search engines. Cheers! TC. Link to comment Share on other sites More sharing options...
♥yesudo Posted February 22, 2004 Share Posted February 22, 2004 in includes/application_top.php: find: // 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)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'])); } } // add the products name to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $name_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION. " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($name_query)) { $name = tep_db_fetch_array($name_query); $breadcrumb->add($name['products_name'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS[ 'products_id'])); } } check the last bit, probably refers to product model in your file, just amend as above. Your online success is Paramount. Link to comment Share on other sites More sharing options...
TomCavendish Posted February 22, 2004 Author Share Posted February 22, 2004 I didn't realise that the page title was being taken from the breadcrumbs. That's great. It works well. :) Thanks! TC. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.