Yii Framework Forum: Slider With Dynamic Content From Cactivedataprovider - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Slider With Dynamic Content From Cactivedataprovider Rate Topic: -----

#1 User is offline   zealotcik 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 6
  • Joined: 19-November 12

Posted 14 January 2013 - 02:17 PM

Hi, I'm having a problem with getting content from CActiveDataProvider and making work it with any slider. Is there any possibility to create dynamic content slider (I want to take data from dataProvider ex. $data->title), or any extension which provides DataProvider usage?

<?php 
    $this->widget('zii.widgets.CListView', array(
	'dataProvider'=>$dataProvider =new CActiveDataProvider('News', array(
            'criteria'=>array(
            'order'=>'create_time DESC',
            'limit'=>3,
            'offset' => 0
            ),
            'pagination' => false
        )),
	'itemView'=>'../news/_slider',
    'summaryText'=>'',
)); ?>


I want to use this code (which is working for 3 last news, but obviously giving three other "sliders"). Could You help me a little bit? Thanks for help.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users