Forums / Templates, Stylesheets, Page Layout / Anyone done a mod to change the html title depending on the page ?

Anyone done a mod to change the html title depending on the page ?

Locked

Views: 1,296

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
30 Dec 2006, 7:16 PM
#1
freef4ll avatar

freef4ll

New Zenner

Join Date:
Nov 2006
Posts:
16
Plugin Contributions:
0

Anyone done a mod to change the html title depending on the page ?

Hi, I would like the have the <title> read something like:

<title>xyz.com PRODUCT A</title>

when a user has opened the page for product a. Same for each page etc.

I have worked out how to code it, but wondered if someone else has already done it?

30 Dec 2006, 7:40 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Anyone done a mod to change the html title depending on the page ?

When you're on a product page, the product's metatags can be used for that.
You can configure these on a per-product basis in the Admin area. No need for special coding.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Dec 2006, 7:51 PM
#3
freef4ll avatar

freef4ll

New Zenner

Join Date:
Nov 2006
Posts:
16
Plugin Contributions:
0

Re: Anyone done a mod to change the html title depending on the page ?

Ok, but that sounds like a manual process.

I would like it to be automatic for whatever page the user is on. Perhaps this is complicated by the fact I am also using the seo mod. Ironically this will actually make this task even easier.

30 Dec 2006, 7:54 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Anyone done a mod to change the html title depending on the page ?

Zen Cart uses the product's name for the TITLE tag. That's pretty automatic.
If you wish to override that on a per-product basis, you can do that as mentioned.

If you're only desiring to add xyz.com as a prefix to every TITLE tag, well, yes, you could change the code in your custom template to do that to suit your needs. Zen Cart adds the store name after the product name as part of its automatic TITLE tag generation.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

30 Dec 2006, 8:01 PM
#5
freef4ll avatar

freef4ll

New Zenner

Join Date:
Nov 2006
Posts:
16
Plugin Contributions:
0

Re: Anyone done a mod to change the html title depending on the page ?

Right, did I miss something there or what!

You're totally correct, thanks for the info, now I need to find where that title is being formatted and modify that.

30 Dec 2006, 8:16 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Anyone done a mod to change the html title depending on the page ?

Your custom html_header.php file works in tandem with your customized meta_tags.php module file to produce all meta-tags, including the TITLE tag.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

18 Oct 2007, 6:15 AM
#7
phycel avatar

phycel

New Zenner

Join Date:
Sep 2007
Location:
Daytona Beach, Florida
Posts:
21
Plugin Contributions:
0

Re: Anyone done a mod to change the html title depending on the page ?

DrByte:

... yes, you could change the code in your custom template to do that to suit your needs. Zen Cart adds the store name after the product name as part of its automatic TITLE tag generation.

While reading these posts I am still not finding the answer to my question. When showing an individual product, the title bar shows -

Product Name - $10.00 : The Store Name :: The Tag Line

I easily found how to turn the price off, thanks to the help secion and these forums -- but I don't want the store name and tag line to show either. I want ONLY the product name to show on all products and categories. Any way to globally do this?

Thanks in advance for your help!

Rene / Phycel Designs

Graphic Arts and Websmith Technologies