Re: dynamic meta tag and title app?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 11:30 AM -0500 11/18/09, Jack S wrote:
Hello All,

Does anyone have a reference to a program that may be out there to
help with using a single header.php for a site, but then dynamically
loads different keywords , titles etc based on what page is including
the header file?

Sample:
If home page include it knows the title and other variables would be
home, about us would be about etc.

--
Thanks!
Jack

Jack:

I do this for my site. It's pretty simple -- please follow:

<head>
<?php
$self = basename($_SERVER['SCRIPT_NAME']);

switch($self)
   {
   case 'index.php':
   ?>
   <title>Title of Index Page</title>
   <meta name="keywords" content="Keywords for Index Page">
   <meta name="description" content="Description for Index Page">
   <?php
   break;

and so on.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux