So I have a CListView, that I can sort using the attributes I’ve set in sortableAttributes, this is fine when it’s just ASC and DESC sorting. But I also want to sort the CListView by a category. In my model I have a category, ranging from 0-8. I’ve made a dropdown select that shows the categories.
What I would like to do is update my CListView when an option in the dropdown is selected, I could write my own jQuery code for this, but I’m guessing there is some smart yii way of doing this.
So updating the CListView like if I set /index?Video[category]=4 just by using AJAX instead, like my sortableAttributes does.
Thanks
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$model->search(),
'sortableAttributes'=>array('views','create_time','release_time'),
'id'=>'#videos',
'itemView'=>$view,
'pager'=>array('cssFile'=>'/css/pager.css'),
)); ?>