Can I optomise the title on a site done with smarty templates

They have: 9 posts

Joined: Mar 2006

I own a site jokingaround.co.uk which I am having problems with as I wanted to optomise my pages title and have found out as the site was done with smarty templates the site can only have a generic title throughout

This makes it hard to optomise each page that has a different content ie halloween, christmas, hats etc.Don't know if anyone knows a way round this ?

As everyone I am trying to improve my pr and traffic, so links are to be added very shortly.

My site is written in PHP linked to a SQL database using oscommerce as the shopping cart.

Any reviews/ criticism/ improvements would be more than welcome.
Thankyou
Martin

Busy's picture

He has: 6,151 posts

Joined: May 2001

You'd have to build up a switch statement (or an ifelse) in the header section of it, something like:

(am using if else as it's easier to shorten for this example)

if($_GET['page'] == 'xmas')
{ $page_title = "xmas words blah "; }
elseif($_GET['page'] == 'hats')
{ $page_title = "hat words blah "; }
elseif
....

then in your title tag add:

<?=$page_title?> default

They have: 9 posts

Joined: Mar 2006

Thanks for the reply, as I am a novice compared with a lot of you guys can you explain more.
Are you saying it can be done and on my site which has hundreds of pages I should be able to have a different title which applies to the content using the switch statement.

She has: 8 posts

Joined: Jan 2006

hi busy thank you for the learn HTML the ez way, for once it makes sense to me
many thanks
Heather

They have: 64 posts

Joined: Oct 2005

Would search engines be able to read the new title?

Busy's picture

He has: 6,151 posts

Joined: May 2001

Mrtoejam, if your site is laid out like index.php?page=first type thing then you can use ther server side code I showed above to allow each seperate page it's own title tag (even meta tags if you wish).
I'll try not to confuse you, but if your pages are built up of a header and footer file, the same code can be used as your only using the one file (header) when displaying your pages.
REally all this work just for search engines isn't worth it, they don't pay that much attention to them, as long as your title tag is descriptive you'd be set. Most of my sites use a header file and the title never changes, and all have pr 4 and 5, then again I did change one site to the second example I mentioned above as an experiment to see if the ranking changes, will take months before I find anything out.

heather, your welcome Smiling

mikehannon, yes search engines would be able to read it as the page is 'put together' before being displayed, so the search engine would see what you see.
If you have a site that supports php, try this:
add

<?php
$title_tag
= "busy made me do it";
?>
before your tag, now in your title tag add
<?php
echo $title_tag;
?>
- keep your old title
now upload and view (wont work on your pc unless you have a server running), your title will be: busy made me do it - keep your old title
and none of the php tags are seen

They have: 9 posts

Joined: Mar 2006

Busy thanks for taking the time to explain things, I would like to be on a " level playing field" with my competitors as the public are searching on "afro wig " for example.
This amongst many other things is something for me to sort out.
As quite a few other people I would imagine I have gone in to the e commerce thing a complete novice but am busily trying to pick up speed.

Busy's picture

He has: 6,151 posts

Joined: May 2001

text keywords in your site will always win out, a keyword url can help too

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.