RE: Site Title in Browser
blueline <[email protected]> 7 Aug 2003 22:16:41 -0000
| Newsgroups | gmane.comp.web.oscommerce.tips |
|---|---|
| Message-ID | <8a7d87cfd445429a0cbaa8fc28389037@osCommerce-Forums> |
This message was sent from: Tips and Tricks
http://forums.oscommerce.com/viewtopic.php?p=209679#209679
----------------------------------------------------------------
Just an add-on. If you want to create dynamic page titles, you can simply add the code below....
define "TITLE" as your shop name....and then add this code to your product_info.php page
replace:[code]<title><?php echo TITLE; ?></title>[/code]
with:[code]<?php
if (isset($HTTP_GET_VARS['products_id'])) {
$title_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$title_results = tep_db_fetch_array($title_query);
echo "<title>Buy " . $title_results['products_name'] . " at " . TITLE . "</title>";
} else {
echo "<title>" . TITLE . "</title>";
}
?>[/code]
HTH,
-Chris