Themes Give Error When Move Index.php

hi all

i use theme and i but it in theme folder

but when i try to move index.php to subfolder the theme crash and the page display without theme

how can i tell themeManager to update baseUrl by add some code in config file

thank you

1-You need to call your current them path

put path in your layout like this :

<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/rs-plugin/css/settings.css" media="screen" />

2- Edit your config and add defult theme :


// 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'=>'theme-en', // folder name 

	// preloading 'log' component


	// autoloading model and component classes





	'sourceLanguage' => '00',

	'language' => 'en',


		// uncomment the following to enable the Gii tool




			// If removed, Gii defaults to localhost only. Edit carefully to taste.






thank you but it still not work

the key is in

‘themeManager’ =>‘baseUrl’

but i can’t update it



subfolder place where i but index.php file

First you need to reread about themes , second check my project them structure I hope will help

Also read :





--index.php(index in subfolder)

index.php(main index)

i use mytheme in main index all thing good

but in index.php file (index in subfolder )

i try to use mytheme but it display only info

and if you view source code of page

it look like this





<link rel="stylesheet" type="text/css" href="/webroot/subfolder/assets/8229aca1/main_old.css" />





<link href="/webroot/subfolder/themes/mytheme/css/style.css" rel="stylesheet">




i need to tell the code to use main assets and theme in webroot not in subfolder

I hope if I explained well

thank you