hi all,
how to change title and meta tags dynamically?
thx
Page 1 of 1
how to change title and meta tags dynamically?
#2
Posted 11 January 2010 - 05:33 AM
boetchax, on 11 January 2010 - 04:41 AM, said:
hi all,
how to change title and meta tags dynamically?
thx
how to change title and meta tags dynamically?
thx
I do not know if what you want, but you can use http://www.yiiframew...iiBase#t-detail
for change the views dynamically
or you can define your own "t" and using a database
I hope is what you want
KISS - Keep It Simple Stupid
ASAP-As Soon As Possible
http://www.yiiframew...oc/cookbook/71/
http://hmsegura.blogspot.com/
ASAP-As Soon As Possible
http://www.yiiframew...oc/cookbook/71/
http://hmsegura.blogspot.com/
#3
Posted 11 January 2010 - 05:52 AM
boetchax, on 11 January 2010 - 04:41 AM, said:
hi all,
how to change title and meta tags dynamically?
thx
how to change title and meta tags dynamically?
thx
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.yiiframew...rMetaTag-detail
#4
Posted 13 February 2012 - 03:57 PM
Nice and elegant tip - thanks very much for that!
andy_s, on 11 January 2010 - 05:52 AM, said:
If you want to set a page title and meta tags in a controller's action, then use the following syntax:
More about the registerMetaTag() method: http://www.yiiframew...rMetaTag-detail
public function actionMyAction()
{
$this->pageTitle = 'New Title';
Yii::app()->clientScript->registerMetaTag('foo, bar', 'keywords');
}
More about the registerMetaTag() method: http://www.yiiframew...rMetaTag-detail
Share this topic:
Page 1 of 1

Help
This topic is locked












