hi all,
how to change title and meta tags dynamically?
thx
hi all,
how to change title and meta tags dynamically?
thx
I do not know if what you want, but you can use http://www.yiiframework.com/doc/api/1.0.11/YiiBase#t-detail
for change the views dynamically
or you can define your own "t" and using a database
I hope is what you want
If you want to set a page title and meta tags in a controller’s action, then use the following syntax:
public function actionMyAction()
{
$this->pageTitle = 'New Title';
Yii::app()->clientScript->registerMetaTag('foo, bar', 'keywords');
}
More about the registerMetaTag() method: http://www.yiiframework.com/doc/api/CClientScript#registerMetaTag-detail
Nice and elegant tip - thanks very much for that!