Change Page Title and Meta Tags for SEO in Yii


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. public function actionMyAction()
  2. {
  3. $this->pageTitle = 'New Title';
  4.  
  5. Yii::app()->clientScript->registerMetaTag('foo, bar', 'keywords');
  6. }

URL: http://www.yiiframework.com/forum/index.php?/topic/6542-how-to-change-title-and-meta-tags-dynamically/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.