Monday, April 8, 2013

yii bootstrap install and buttons types



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. 
// Add the following line to /protected/config/main.php 
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.

No comments:

Post a Comment