yiicdetailview

Yii 1.x, CDetailView - how to not display only one attribute from many?


I have model with many fields and I have "view" action to show detailed informations. In this view, I want to display all field without one, how can I do this? Do I have to write all fields in "attributes" array without that one which I don't want to show?

//Edit: I'm using CDetailView to show one specific record. I want show all fields from that record without one specific field, e.g. ID of record.

PS. Sorry for my English, I'm not native English speaker. Regards


Solution

  • You have to write all fields in "attributes" array without the one which you don't want to show in CDetailView.

    Let me know if there is any concern/query for the same.