Im a newbie to yii and have been trying to add bootstrap and giiplus extension to yii.However after adding the extracted file to extensions folder and making changes in main.php I cant seem to get error in displaying even the main page.I followed this tutorial..
Download extension from here .
Paste all bootstrap extensions folders what you have download under extensions/bootstrap
Add before starting of array Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
Add under return array
'theme'=>'bootstrap', 'modules'=>array( 'gii'=>array( 'generatorPaths'=>array( 'bootstrap.gii', ), ), ),
Add in under components
'bootstrap'=>array(
'class'=>'bootstrap.components.Bootstrap',
),
Paste code in class
public function init() {
$this->registerAllCss();
$this->registerJs();
parent::init();
}
Paste the line under head tag
<?php echo Yii::app()->bootstrap->init();?>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.