我在CDetailView上添加链接“工作不正常”


Yii add link on CDetailView Not Working Correctly

我正在使用zii.widgets.CDetailView

当我尝试添加target='_blank'的链接时。尽管我添加了目标空白,但这永远不会起作用。链接总是在同一选项卡中打开

这是我的代码:

$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'htmlOptions'=>array('class'=>'table table-condensed table-hover'),
'attributes'=>array(
    'idproduct',
    array(
        'name'=>'Preview',
        'type'=>'html',
        'value'=>(
            (!empty($model->picture->filename_thumb))?
            CHtml::image(Yii::app()->baseUrl . "/images/product/".$model->picture->filename_thumb,"Preview",array("width"=>"75px","height"=>"75px")):"No Image"             
        ),
    ),
    array(
        'name'=>'Company',
        'type'=>'html',
        'value'=>$model->company->name,
    ),
    array(
        'name'=>'Product URL',
        'type'=>'html',
        'value'=>CHtml::link(CHtml::encode('Click Here'), "http://localhost/voucher/".$model->urlproduct, array("class"=>"btn btn-info","target"=>"_blank")) 
    ),
),  

));

array(
    'name'=>'Product URL',
    'type'=>'html',
    'value'=>CHtml::link(CHtml::encode('Click Here'), "http://localhost/voucher/".$model->urlproduct, array("class"=>"btn btn-info","target"=>"_blank")) 
),

更改"type"=>"html",

到"type"=>"aw",