RSortDropDownListWidget
RSortDropDownListWidget display a dropDownList with sort link for CSort class
In Controller action:
$sort = new CSort; $sort->modelClass = 'Product'; $sort->attributes = array( 'product_price', 'product_time', 'product_rate', 'product_title', ); $products = new CActiveDataProvider('Product', array( 'criteria' => $criteria, 'sort' => $sort, ... )); ... $this->$render('view',array( 'model'=>$model, 'products'=>$products, 'sort'=>$sort, ));
In your view:
$this->widget('ext.RSortDropDownListWidget.RSortDropDownListWidget', array( 'sort'=>$sort, 'labels'=>array( 'product_price'=>array( 'asc'=>'Price up', 'deck'=>'Price down', ), 'product_title'=>array( 'asc'=>'Alpabet', 'deck'=>'Alpabet deck', ), ), ));
Total 3 comments
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
I adding little more documentation. In the near future I will do the demo.
This widget looks like "CHtml::dropDownList"
Do you mind adding a little more documentation? maybe a demo?
Leave a comment
Please login to leave your comment.