Activating A Theme In Yii And If I've Installed Bootstrap Properly.

Hi Guys & Gals,

I’ll admit to being a newbie to the Yii framework and Bootstrap. I have managed to create the “Testdrive” application on my test yii install. I think I’ve installed Bootstrap but I stand to be corrected on that score.

More importantly I’m struggling to activate the theme I’d like to use. I have gone through all Yii tutorials I can find and have changed the ‘theme’ => ‘xxxx’ without success.

So I will post a copy of my protected/config/main.php in the hope I’ve made a glaringly obvious mistake and someone can point it out to me. I have double-checked file/folder permissions to eliminate that an issue.

If you want to see the demo site live the url is www. testdrive

Feel free to ask me anything and I’ll answer as best I can.



Ross, Did you copy the files to the "protected/theme" folder? If yes then follow these steps to enable the bootstrap in your main.php

Put the following

Yii::setPathOfAlias(‘bootstrap’, dirname(FILE).’/../extensions/bootstrap’);

‘theme’=>‘bootstrap’, // requires you to copy the theme under your themes directory. In my case my theme name is bootstrap

hello Ross…

i want to create a desktop shortcut to run the web application …

mean to say that i wanna use my web application like a software that can operated from desktop…

can you plz give me any suggestion about it …

plz reply …

and sorry for my English…

Erm the actual command I used in the linux terminal wasn’t very long but requires you to be logged in via ssh to your website. And I’m afraid I’m not much of an expert on terminal usage and ssh. Maybe you might be better off asking some one on a linux forum? Sorry I can’t be more help.

You can safely ignore requests from users who ends their sentences with lots of dots, who can’t be bothered to spell properly and uses ‘plz’, ‘lol’ and other l33t words.

They are only looking for someone who can be bothered to take them by the hand and lead them through everything.

I think they are called Help-Vampires:

Hi Ross,

So, your site seem to work with Bootstrap without Yii::setPathOfAlias(‘bootstrap’,dirname(FILE).’/../extensions/bootstrap’); in the main.php , I"ve noticed.

I just can’t seem to get anything to work and I keep getting the error

Alias "bootstrap.widgets.TbActiveForm" is invalid. Make sure it points to an existing PHP file and the file is readable.

I’ve attached my main.php file in case I’ve missed something obvious as well. Do hope that you could share how did you make Bootstrap work for you.

Thanks in advance