Other articleAdded on Mar 24, 2012
The above code first creates a data provider for the Post ActiveRecord class. It then uses CListView to display every data item as returned by the data provider. The display is done via the partial view named '_post'. This partial view will be rendered once for every data item. In the view, one can access the current data item via variable $data. For more details, see itemView. In order to support sorting, one has to specify the sortableAttributes property. By doing so, a list of hyperlinks that can sort the data will be displayed.
Test newsAdded on Mar 22, 2012