You are here:  » Page title

Support Forum



Page title

Submitted by bloach on Mon, 2008-02-18 08:51 in

Hi guys,

I would like to set up titles as following:

Home Page - Home Page Title
Product Page - 'Product Name'
Category Page - 'Category Name'
Merchant Page - 'Merchant Name'
Brand Page - 'Brand Name'
Reviews Page - Product Reviews of 'Product Name'

I don't want my site title added to other pages.

Any hacks?

Thanks

Submitted by support on Mon, 2008-02-18 14:04

Hi,

For the Home Page - see my reply to your other thread...
http://www.pricetapestry.com/node/1886

The site title is only used on pages that do not generate a dynamic title, so that shouldn't cause any problems.

The product page title is set to the product name in the distribution - let me know if that is not appearing as you are expecting it to.

The Category/Merchant/Brand pages are all actually generated by search.php, in which the page title is set to be the query by the following code on line 154:

$header["title"] = $q;

...the query being something of the format: "merchant:Some Merchant" in the case of a merchant page. What you can then do as add the following code immediately AFTER this line to remove the prefix, leaving you with the merchant, category or brand name as required:

  $header["title"] = str_replace("merchant:","",$header["title"]);
  $header["title"] = str_replace("category:","",$header["title"]);
  $header["title"] = str_replace("brand:","",$header["title"]);
  $header["title"] = str_replace(":"," ",$header["title"]);

Hope this helps!
Cheers,
David.