Month: October 2009

How to set the meta tag information intemplate file in symfony

You can set the meta tag information in your template file as below.

sfContext::getInstance()->getResponse()->setTitle(‘Your meta title here’);
sfContext::getInstance()->getResponse()->addMeta(‘description’,’ Meta description information’);
sfContext::getInstance()->getResponse()->addMeta(‘keywords’,’meta tag keywords seperated by commas’);

That’s it.

Thanks