BootSlider use Twitter's Bootstrap extension together with Yii. There are sevral Yii-widgets that allow you to easily use Bootstrap with Yii.BootSlider is a widget that use Carousel in Twitter's Bootstrap and extended from CListView so using CArrayDataProvider or CActiveDataProvider we can create image slider
Download ¶
Requirements ¶
Update ¶
added auto slider
'slide'=>array(true,2000),//to slide after 2seconds 'slide'=>array(true),// default after 6seconds
/*
no need to use 'slide' if no automatic sliding is needed
--- or -----
'slide'=>array(false),
*/
Usage ¶
setup bootstrap extension in your yii app by referring http://www.yiiframework.com/extension/bootstrap then add this widget in your "protected/extensions/bootstrap/widgets"
then use following code set pagination always false
//$rawData is array
$listDataProvider=new CArrayDataProvider($rawData, array(
'pagination'=>false,//always false
));
<?php $this->widget('bootstrap.widgets.BootSlider',
array('itemView'=>'_list',//_lsit is the php file to render
'id'=>'Mycarouse1',//id of Carousel
'slide'=>array(true,2000),//to slide after 2seconds
'dataProvider'=>$listDataProvider,
'coloumCount'=>4,//no of items to shown in slider
));?>
//_list.php
<style>
a #image{
height:150px;
}
</style>
<div class="thumbnail span2">
<img id="image" src="<?php echo Yii::app()->baseUrl.'/images/'.$data['image']; ?>" alt="">
</div>
Resources ¶
support@nintriva.com
error
Bootstrap and its behaviors do not have a method or closure named "enableTransitions". I am sure this is from all the changes that have been made to bootstrap since you last updated this extension. Any idea how to fix it?
good one.
good one. working fine for me.
thanks
nice extensions
$rawData ???
where is the "$rawData" definition?
Bootstrap and its behaviors do not have a method or closure named "enableTransitions"
Bootstrap and its behaviors do not have a method or closure named "enableTransitions". I am sure this is from all the changes that have been made to bootstrap since you last updated this extension. Any idea how to fix it?
fixed
fixed, it will work now
what should the _list file look like?
can you give an example please?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.