February 06, 2014

How to set Yii description tag and Meta keywords

Here I have put some stuff on how to set yii description tag and meta tag in head tag.

You can use as follows:

<?php 

//Setting yii Description

Yii::app()->clientScript->registerMetaTag('Welcome to Yii Description -  Yii frameworrk', 'description', null, array('lang' => 'en'));

// Setting yii set keywords

Yii::app()->clientScript->registerMetaTag('yii, php framework', 'keywords', null, array('lang' => 'en'));

?>


All you need to register is meta as simple we do in normal web page head struture.

No comments:

Post a Comment

Thank you very much for your comment.
Your message has been successfully sent out to author of this blog.