#Yii_tips: Setting meta tags in view in Yii framework
@master_yii
Updated July 12, 2013 ● 2,216 views
Updated July 12, 2013 ● 2,216 views
Yii channell is about Yii PHP Framework. Yii is a free, open-source Web application development framework written in PHP5 that promotes clean, dry design and encourages rapid development. It works to streamline your application development and helps to ensure an extremely efficient, extensible, and maintainable end product.
If you are a fellow Yii developer, join us! Do not hesitate to share your ideas. If you have a Yii product, you are welcome to share your creation here.
Check out Yii Framework official website.
If you wonder how to set the meta tags in view in Yii framework, it's very simple. Just call Yii::app()->clientScript->registerMetaTag() function.
For example:
To set meta description:
To set meta keywords:
For example:
To set meta description:
Yii::app()->clientScript->registerMetaTag("The description", "description");
To set meta keywords:
Yii::app()->clientScript->registerMetaTag("The, keywords, etc.", "keywords");
I think Yii is a very good PHP framework. I used to use Joomla but ir's a CMS. Too many unwanted features. I'd rather create from scratch and Yii provides goodstarting point.
RobZ · 11 years agopermalink · reply (1)
@RobZ: funny i used to work with Joomla too. Now full pledge Yii fan. Follow me so we can share Yii ideas.
master_yii · 11 years agopermalink · reply
Yii is the best PHP framework. Thanks for this tip.
Prakash1 · 11 years agopermalink · reply (0)
All of a sudden I got the Yii Novice badge for this old post. Looks like a couple of Yii developers signed up. Thanks. Please feel free to cooment.
master_yii · 11 years agopermalink · reply (0)