Forum Moderators: coopster
One method could be to use a language file and define each pages keywords, description, and title in that and include it in your php page
define("PAGE1_TITLE", "Your page title");
define("PAGE1_KEYWORDS", "keyword1,keyword2,keyword3");
define("PAGE1_DESCRIPTION", "Description of my site");
Then in your tpl call it like so
{$smarty.const.PAGE1_TITLE}
{$smarty.const.PAGE1_KEYWORDS}
{$smarty.const.PAGE1_DESCRIPTION}
Another option is to assign your information in the php file like so
$title = "Your page title";
$keywords = "keyword1,keyword2,keyword3";
$description = "Description of my site";
$smarty->assign('title',$title);
$smarty->assign('keywords',$keywords);
$smarty->assign('description',$description);
then in your .tpl file
<title>{$title</title>
<meta name="description" content="{$description}" />
<meta name="keywords" content="{$keywords}" />
This is just a couple different ways I have used your milage may very
Regards,
Brandon
I simply have a table in the database which contains all the relevant page info.
Page_ID File_Name Title Header_1 Header_2 etc.
I then match the filename of the requested page, and pull in all of the relevant info into an array
$smarty->assign('PageInfo',$PageArray);
Then within smarty i just reference it where needed
<title>{$PageArray.Title}</title>