Issue #196 new
created an issue

I downloaded the newest version, follow this link to set it up: but no bootstrap css loaded. Do I have to call Yii::app()->bootstrap->registerAllCss(); manually in controller?

Comments (12)

  1. Stereo

    As i need to get work done, i have inserted a quick fix in bootstrap/components/Bootstrap.php:

    public function init() {

    and called the bootstrap component in preload-array within main.conf.

  2. Nikola Kovacs

    You just need to call Yii::app()->bootstrap->register() in the layouts or views where you want to use it, that'll insert the base bootstrap css and js (minus plugins). That way you can include bootstrap only where you need it.

  3. Stereo

    do i need to call this method in any layout to get bootstrap working? because after i do the setup as described in the docs it is not working... have i missed something?

  4. Arun S. Sekher

    After copying the the yii-bootstrap extension's theme directory to your webapp's theme directory rename it to 'bootstrap' and let the webapp know what theme to use by adding the below line to config/main.php just after the name param for the webapp.

    'name'=>'My Web Application',
  5. Rich Webster

    Steps that worked for me: 1. (did this) 2. added <?php Yii::app()->bootstrap->init(); ?> to the header of protected/views/layouts/main.php (thanks rizmailov!) 3. added 'name'=>'My Web Application', 'theme'=>'bootstrap', to protected>config>main.php (thanks, Arun!)

    the instructions at were incomplete. The instructions at were incomplete. The comments at were out of date I found an out-of-date YouTube video. I wasted a whole day.

    But, hey, welcome to open source coding!

  6. Randy Matthews

    hi Rich,

    I tried following your instructions, exactly, and I can't get this to work.

    for (1), did you copy all that code and put it at the bottom of the main.php file in the config directory? like below the existing array that's already there?

    for (3), what array did you alter in main.php? there's already a "'name'=>'My Web Application'" in the array that's part of the default configuration.

    and did you have to create your own init() function, as specified above?

    any insight you might be able to add would be great. sorry, i am new to Yii, and don't understand all of this quite yet.



  7. Log in to comment