Steps for sticking slider to you website in YII.
- DOWNLOND slider
- Extract .zip in “extensions” folder. ( protected/extensions/Slider/slider.php )
- Put below code in your view file as according to your need.
for slider-1.1.0 - updated with automatic slides CODE -
<?php $this->widget('application.extensions.slider.Slider',array(
'items'=>array(
array($src, $alt),
array($src, $alt),
array($src, $alt),
),
'options'=>array(
'speed'=>'3000',
),
)); ?>
DEMO -
<?php $this->widget('application.extensions.slider.Slider',array(
'items'=>array(
array(Yii::app()->getBaseUrl(true).'/images/img1.png', 'image1'),
array(Yii::app()->getBaseUrl(true).'/images/img2.png', 'image2'),
array(Yii::app()->getBaseUrl(true).'/images/img3.png', 'image3'),
array(Yii::app()->getBaseUrl(true).'/images/img4.png', 'image4'),
),
'options'=>array(
'speed'=>'3000',
),
)); ?>
for slider-1.0.0 CODE -
<?php $this->widget('application.extensions.slider.Slider',array(
'items'=>array(
array($src, $alt),
array($src, $alt),
array($src, $alt),
),
)); ?>
DEMO -
<?php $this->widget('application.extensions.slider.Slider',array(
'items'=>array(
array(Yii::app()->getBaseUrl(true).'/images/img1.png', 'image1'),
array(Yii::app()->getBaseUrl(true).'/images/img2.png', 'image2'),
array(Yii::app()->getBaseUrl(true).'/images/img3.png', 'image3'),
array(Yii::app()->getBaseUrl(true).'/images/img4.png', 'image4'),
),
)); ?>
NOTE – Make sure image size as your slider size.
Snap Shot --
Enjoy your new light weight slider. Let me know if you've any query about anything in YII.
Example
Hello,
Is there any demo of this slider?
NO but I can upload snap shot of it.
I haven't server to upload it. But I can show you how it looks.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.