We are going to deploy the new yiiframework.com website on March 23, 2018 from 8:00 to 12:00 UTC.
Website and Yii documentation will not be available in this time frame. Check the news for more details.

Yii 1.1: rsortdropdownlistwidget

display a dropDownList with sort link for CSort class


RSortDropDownListWidget display a dropDownList with sort link for CSort class

Using: ΒΆ

In Controller action:

$sort = new CSort;
$sort->modelClass = 'Product';
$sort->attributes = array(
$products = new CActiveDataProvider('Product', array(
    'criteria' => $criteria,
    'sort' => $sort,

In your view:

$this->widget('ext.RSortDropDownListWidget.RSortDropDownListWidget', array(
            'asc'=>'Price up',
            'deck'=>'Price down',
            'deck'=>'Alpabet deck',


Total 3 comments

#5653 report it
Asgaroth at 2011/10/28 02:27pm

thats better, if you dont have a demo you can publish anytime soon, a screenshot would help, many people (including me) dont feel like downloading/installing/testing just to see what it "looks like", or what it actually "does".

just MO

#5652 report it
Rsol at 2011/10/28 02:01pm
little more documentation

I adding little more documentation. In the near future I will do the demo.

This widget looks like "CHtml::dropDownList"

#5649 report it
Asgaroth at 2011/10/28 11:04am

Do you mind adding a little more documentation? maybe a demo?

Leave a comment

Please to leave your comment.

Create extension