How to set up yiibooster
thanks for reading i am wondering how to install
YiiBooster
i need to install
YiiBootstrap
first? I want to install it manually, is it enough to extract it to the extensions folder and customize it, main.php
or is there something I can't see?
Also how can I make this point on the right track
'booster' => array(
'class' => 'path.alias.to.booster.components.Booster',
),
+3
source to share
3 answers
You don't need to install bootstrap. Yiibooster includes all the boot files it needs. Just download Yiibooster, unzip the extension folder and add below to your main config file,
'booster' => array(
'class' => 'ext.yiibooster.components.Bootstrap',
'responsiveCss' => true,
),
Then add the following in the config preload section,
'booster',
+2
source to share
// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');
Yii::setPathOfAlias('bootstrap', dirname(__FILE__).'/../extensions/bootstrap');
// preloading 'log' component
'preload'=>array('log','bootstrap'),
// application components
'components'=>array(
//
'bootstrap' => array(
'class' => 'bootstrap.components.Booster',
'responsiveCss' => true,
),
+1
source to share
Rename the folder name yiibooster-4.0.1 to yiibooster
Step 1:
'preload' => array(
'booster',
),
Step 2:
'booster' => array(
'class' => 'ext.yiibooster.components.Booster',
'responsiveCss' => true,
),
Note: Booster is the name of this class
//Use view file
<?php
$this->widget('booster.widgets.TbExtendedGridView',
array(
'filter' => $model,
'fixedHeader' => true,
'type' => 'striped bordered',
'headerOffset' => 40,
// 40px is the height of the main navigation at bootstrap
'dataProvider' =>$model->search(),
'template' => "{items}",
'columns' => array(
'id',
'firstname',
'lastname',
'age',
'address',
'email',
),
)
);
?>
0
source to share