PDA

View Full Version : Meta Tags on additional pages?


benfriedman
02-04-09, 15:45
How can i get the meta tags to change depending on the page i am on. For example my contact us page - http://www.chemistcompare.co.uk/compare/index.php?page=contact - has the same metas tags as the home page. can i change this?

Andy
03-04-09, 16:57
use Smartys {if} {else} {/if} dependant on the page theyre looking at.
Stick a shortened description in meta, stick the product name in the Title etc.

deekstar
06-05-09, 21:09
Dear Andy,
This subject was something I was asking in the begining because all pages on my site were the same title meta tags whatever page you were viewing, I can't actually access an individual page, for example "Man Utd Shirts" to put meta tags in, the explanation you gave above was a breath of fresh Air to see and says to me this is possible, but as usual I need it spelled out! If each category and product page had it's own auto meta tag title we would be well ahead on SEO, so at the moment my whole site with thousands of potential pages and product names all have the same meta tags title/description, which is one big site of just the homepage meta tags, can you help with this in more detail?
Also how do you make a background image fit any size browser window, I have background images behind the product box displays, which you helped me with a while ago, can you tell them to float or stretch to the width of users computer screen or browser, in my partners big applemac, which has a bigger width than 1280, the image starts to repeat itself after the 1280 width, can it be stretched to match screen/browser width ect
Cheers in advance, Thanks for all the help you give us,
Deekstar

IntroSites
07-05-09, 16:00
Browse thru www.clothing-empire.co.uk and watch the TITLES for each section, cat, by price, item page each

Is this what you are looking for

deekstar
11-05-09, 02:16
I see your pages say what each product/category is in the browser title at top of screen, for example, your men's socks page says just that and your women's bra's page says that it is Bra's, this is what I meant, all my pages say the same title as the homepage no matter what product or category, very boring and bad SEO, how do you make it the actual name of the page, IE; man utd Shirts
Cheers for answer

Andy
11-05-09, 18:44
OK, very quick (and slightly ambiguous) explanation.

For product pages, you'll be wanting at the very least, the Product Title in the title tag.

By the time the script starts using the Smarty templates, all the information you'll need is already contained in memory.

The trick is to find what displays what and use it where you want it to be.

So, by looking in (templates)/elements/product_display.tpl we know that this will display the product title on the page:{$oProduct->sName}As I said, that variable is already well and truly set before any templates are used, so we can use that variable to put the Product title anywhere in the HTML. For instance:

open (templates)/product.tpl

find (default code):<title>{#siteTitle#} {$sBreadCrumbText}</title>change to:
<title>{#siteTitle#} {$oProduct->sName}</title>And you'll have the Product Name in the title tag.

Feel free to add it to a meta description, meta keywords, and anywhere else in product.tpl or product_display.tpl

For Category or product list pages, the idea is similar, but not the same. The easiest thing to do here is use the breadcrumb text as this is already set and needs no extra PHP messig about. Just remove {#sitetitle#} from the title tags and it'll display just the category structure.

deekstar
12-05-09, 05:57
Cheers Andy,
that makes it all alot clearer!
Best Regards,
Deekstar densoid

Andy
12-05-09, 08:17
You're welcome deekstar:D

IntroSites
12-05-09, 18:22
Apologies for not replying with the code been away, thanks Andy for showing the solution