Question about seo and performance about Yii

Hey,I have several questions after learn Yii about 2 months.

  1. Dose Yii support set the page keywords and description, like the $this->pageTitle, do Yii have $this->pageKeywords?

  2. About the css file and image file, In Yii mostly got the css use Yii::app()->baseUrl . ‘/css/xxx.css’, also the image, What I think if got the file with http method, will cost some server transfer stuff, but not sure, If I want to make every thing like <image src="../images/xxx.jgp">, anyone have some goodideas?

thx a lot!

  1. You can add a property to the Controller base class in protected/components/Controller.php. Eg.



class Controller extends CController {

    public $pageDescription = 'Put your default description in here.';

}



Then in your view you can do




$this->pageTitle = 'Title of page';

$this->pageDescription = 'A different description'; // If you leave this out, your layout will use the default.



Then you just need to echo this out in your layout file (probably protected/views/layouts/main.php

… Or just read this cookbook article on setting meta tags http://www.yiiframework.com/doc/cookbook/54/