I’m setting up a web application with yii 1.1.7.
I’m trying to set up a custom theme.
For that, I created a new directory in a default web app (./yiic webapp ...
), let’s call it /themes/mytheme.
I copied all the files from /themes/default into the new theme.
I added a "theme" property in /protected/config/main.php:
return array(
'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
'theme'=>'mytheme',
....
I made sure the "theme" directory is correct.
However, when I try to output the theme’s base URL in a view like so:
<?=Yii::app()->theme->baseUrl; ?>
it returns null
. According to the themes tutorial, that means that the theme was not recognized.
I then tried copying all the files from the /protected/views directory into my new theme, but to no avail.
What else do I have to do to activate the theme?