sliderwidget Slider for your gallary

Steps for sticking slider to you website in YII.

  1. DOWNLOND slider
  2. Extract .zip in “extensions” folder. ( protected/extensions/Slider/slider.php )
  3. 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 -- slider

Enjoy your new light weight slider. Let me know if you've any query about anything in YII.

0 0
2 followers
1 914 downloads
Yii Version: Unknown
License: BSD-2-Clause
Category: User Interface
Developed by: sarthak
Created on: Mar 17, 2014
Last updated: 10 years ago

Downloads

show all

Related Extensions