Help Me

I download some yii theme like as ‘News Source’ from website. I unzip it. Here some folder or file like as ‘css, img, js or views’. But I don’t know where need to place (root path), how to edit and run it. So please Any body help me to edit yii theme.

Thank you.

Basically, you need to understand this: Yii theming

After that, you can extract your "News Source" theme in your-webapp/themes/newssourcefinal

(if you don’t have de theme’s folder, create it!)

To config the application to use the new extension, change the protected/config/main.php:


// uncomment the following to define a path alias

// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable

// CWebApplication properties can be configured here.

return array(	

   			'theme'=>'newssourcefinal', // requires you to copy the theme under your themes directory 	





After switching to new theme, for registering .css and .js files you need to use

$cs = Yii::app()->getClientScript();   $cs->registerScriptFile('/js/yourscript.js');   $cs->registerCssFile('/css/yourcss.css');