apw Posted June 9, 2009 Share Posted June 9, 2009 Hello, my php website is a free link directory similar to dmoz directory. My website uses templates to handle the content but my question is i want to add meta-tags and other content to get my website seo ready .. Is this possible with templates? Quote Link to comment Share on other sites More sharing options...
gevans Posted June 9, 2009 Share Posted June 9, 2009 What templates are you using? Do you have a seperate header template, or does a 'system' create a singel template for each page? Quote Link to comment Share on other sites More sharing options...
gijew Posted June 9, 2009 Share Posted June 9, 2009 I use Smarty as my template system of choice and it's quite possible (most likely the same with others too) by changing a few of the sites constants or variables. I have a config file where I hold my site defaults so there I have the default page title & meta info (description, keywords, etc). Now on each page I just set the constants differently and the page takes on the new data. Example. config file $smarty->assign('site_title', 'This is my title'); $smarty->assign('site_description', 'This is my description'); $smarty->assign('site_keywords', 'kw1, kw2, kw3'); contactus.php (random example) $smarty->assign('site_title', 'Contact us'); $smarty->assign('site_description', 'Page for contacting company x'); $smarty->assign('site_keywords', 'contact, form, etc'); HTH Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.