How to display plain text instead or a sort link in a list.php page

Hi there

I have a list.php generated by yii in one of my views. The sort is working fine when clicking on the <th> links, but what If I don't want some of the columns to be sortable. Is there a way of returning only a text heading instead of a link?

Did you try typing it  ??? ???

I suppose I could just hardcode it, but I want to be able to use yii the correct way and make use of the $model attributes, and if the need arise to change the heading, I could just use the public function attributeLabels() model method

I did exactly that:

http://www.yiiframew…pic,1679.0.html

Since two methods side by side probably isn't needed, the best solution would be to just extend CSort, override link() and call the parent function.

/Tommy

tri, you are a LEGEND. Thanx alot  ;D

;)

In case you didn't already found out you have to specify which columns should be sortable using $sort->attributes(). With my css solution, the header looks like plain text but is still clickable and "tabable". Clicking on the header will reload the page. Some more work has to be done to fix that.

/Tommy