2014-11-15 63 views

回答

1

而不是定义的数据时,您的详细视图中显示使用

array(
    'attributeName1', 
    'attributeName2', 
) 

的,使用

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

这给了你,但是你想它格式化内容的权力。