Yii-Bootstrap

Bringing together the Yii PHP framework and Twitter Bootstrap.

Yii-Bootstrap is an extension for Yii that provides a wide range of widgets that allow developers to easily use Bootstrap with Yii. All widgets have been developed following Yii's conventions and work seamlessly together with Bootstrap and its jQuery plugins.

Setup

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

Download Yii-Bootstrap

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
    'modules'=>array(
        'gii'=>array(
            'generatorPaths'=>array(
                'bootstrap.gii',
            ),
        ),
    ),
    'components'=>array(
        'bootstrap'=>array(
            'class'=>'bootstrap.components.Bootstrap',
        ),
    ),
);

You're done! Now you can start using Bootstrap in your application. For examples on how to use the widgets please visit the docs.

Comments

Back to top ↑