PHP - Yii Framework tutorials, Extension, Component Devlopment: How to set Yii description tag and Meta keywords

Wednesday, 11 February 2015

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

Comment has been successfully posted.