You are here:  » Seo Title in browser

Support Forum



Seo Title in browser

Submitted by frederic on Fri, 2010-01-08 10:22 in

Hello David.

I wanted to know how it was possible to change the title seo browser.

I looked at this URL: http://www.pricetapestry.com/node/3026
but it is not what I expected.

Currently for a model page i got a page title is:
Model name - Mozilla Firefox

I would have this:
Personnal Text Brand Model name - (info from CONFIG_TITLE) - Mozilla Firefox

Can you help me again :)?

Many thanks,

Fred.

Submitted by support on Fri, 2010-01-08 10:28

Hello Fred,

Sure - the product page title is currently set by the following code on line 50 of products.php:

$header["title"] = htmlentities($q,ENT_QUOTES,$config_charset);

So, for the title style you want, REPLACE that line with:

$header["title"] =
  "Personal Text"." ".
  htmlentities($product["products"][0]["brand"],ENT_QUOTES,$config_charset)." ".
  htmlentities($q,ENT_QUOTES,$config_charset)." - ".
  "(".htmlentities($config_title,ENT_QUOTES,$config_charset).")";

Cheers,
David.

Submitted by frederic on Fri, 2010-01-08 13:09

Thanks David,

It works great.

I managed to make the change to "search.php" too!

Only trouble, when i search by "category" and "brand" I got "brand: Adidas" in the seo title browser.

I would remove the "brand" and ":" after the brand name or / category.

Can you give me the changes caus' i'm not very well understood on post: http://www.pricetapestry.com/node/3026

Many many Thks,

Fred.

Submitted by support on Fri, 2010-01-08 13:16

Hi Fred,

Easiest way is to remove them after you have created $header["title"], so on the next line, add:

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

Cheers,
David.

Submitted by frederic on Fri, 2010-01-08 13:23

Yes David

It's ok , but the ":" are always after the "brand" or "category" name :s

How to delete the :

Thks,

Fred.

Submitted by support on Fri, 2010-01-08 13:30

Hi Fred,

Sorry - I missed that out - use this in place of the above modification:

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

Cheers,
David.

Submitted by frederic on Fri, 2010-01-08 13:32

Great, great, great !!! Works !
Many Thks,
Fred.