Set up Yii-Bootstrap in Yii Framework

Download the latest release from Yii extensions by following the link below:

Unzip the extension under protected/extensions/bootstrap and modify your application configuration accordingly:

If you wish to use the provided Bootstrap theme copy the theme directory to your themes directory.


// Define a path alias for the Bootstrap extension as it's used internally.
// In this example we assume that you unzipped the extension under protected/extensions.
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');

return array(
    'theme'=>'bootstrap', // requires you to copy the theme under your themes directory

3 thoughts on “Set up Yii-Bootstrap in Yii Framework

  1. i have use this code but it give CException like: Property “CWebApplication.0” is not defined.
    how to solve this exception..please give me replay…as soon as you can..

  2. This is not work ..


    Property “CWebApplication.bootstrap” is not defined.


    093 /**
    094 * Getter magic method.
    095 * This method is overridden to support accessing application components
    096 * like reading module properties.
    097 * @param string $name application component or property name
    098 * @return mixed the named property value
    099 */
    100 public function __get($name)
    101 {
    102 if($this->hasComponent($name))
    103 return $this->getComponent($name);
    104 else
    105 return parent::__get($name);
    106 }

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s