1

When there is no any data in one column the words "No set" are displayed, i want to change this message but i don't know where o how to do it, i have try extending CDetailView but it didn't work, any sggestion?

4

1 回答 1

1

而不是使用

array(
  'attributeName1',
  'attributeName2',
)

在定义要在详细视图中显示的数据时,使用

array(
  array(
    'label'=>'Whatever you want',
    'value'=>null===$model->attributeName1?
      "custom message":
      $model->attributeName1,
  ),
  'attributeName2',
)

这使您能够根据需要对内容进行格式化。

于 2014-11-15T02:55:47.947 回答