jteerman
01-14-10, 01:27 PM
I'd like to modify my header.tpl file to modify the <title> and <meta description> tags based on the page they are accessing. I've added this to my file:
{php}
if ( $_SERVER["PHP_SELF"] = "/index.php" ) {
$metatitle = "Home Page ";
$metadescription = "This is the HOME meta description. ";
}
if ( $_SERVER["PHP_SELF"] = "/hosting.php" ) {
$metatitle = "Hosting Plans Page";
$metadescription = "This is the HOMSTING PLANS meta description. ";
}
{/php}
<title>{$companyname} - {$metatitle}</title>
When the page displays, only the company name appears.
Any help will be greatly appreciated!
Jeff
{php}
if ( $_SERVER["PHP_SELF"] = "/index.php" ) {
$metatitle = "Home Page ";
$metadescription = "This is the HOME meta description. ";
}
if ( $_SERVER["PHP_SELF"] = "/hosting.php" ) {
$metatitle = "Hosting Plans Page";
$metadescription = "This is the HOMSTING PLANS meta description. ";
}
{/php}
<title>{$companyname} - {$metatitle}</title>
When the page displays, only the company name appears.
Any help will be greatly appreciated!
Jeff