Im in a bind here guys. I have a site that uses CSS. The links to each page call a php file, and inside the php file 2 .tpl (template) file's are called. One template file is the actual with the information on it. Another is a background.tpl file which includes the title/meta tags/sidebar information..etc. So here's where I go wrong. Every page calls the background template where the <head></head> is located, therefor every page has the same title and meta keywords/description. Is there anyway I can fix this? Pllleeasseee Help!
You can use PHP to specify title en meta on each page. On every page where you need the head included I would start off with <?php $thisTitle = "This is the page title"; $thisDesc = "This is the description for this page"; $thisKeywords = "keyword1, keyword2, keyword3, etc"; include("background.tpl"); ?> Code (markup): And then just substitute these variables in your background.tpl: ... <title><?php echo $thisTitle; ?> - Your site name</title> <meta name="keywords" content="<?php echo $thisKeywords; ?>" /> <meta name="description" content="<?php echo $thisDesc; ?>" /> ... Code (markup):
thanks stresh. that didn't seam to work though..when i did that the page posted this as a title Also, I am not sure how that would work because the background.tpl is a gloabl file it's contained in every page.. here's an idea: Top part of the background.tpl (included in every php file) And here is the php (each section has its own php that points to the .tpl file with the page information on it) anymore help is appriciated