2016-08-11 2 views
0

J'ai un CGridView, une colonne particulière est CLinkColumn. Le pied de page de cette colonne apparaît actuellement en texte clair, j'ai besoin d'être aussi hyperlié.Lier un texte de pied de page dans CGridView, Yii 1.1.15

$this->widget('zii.widgets.grid.CGridView', array(
     'dataProvider'=>$provider_sales, 
     'columns'=>array(
      ..., 
      array(     
       'header'=>'Status', 
       'class'=>'CLinkColumn', 
       'urlExpression'=>function($data){ return ...}, 
       'footer'=> number_format($totals['status']), 
      ), 
     ), 
)); 

Comment puis-je le convertir en lien hypertexte? Maintenant, j'ai juste besoin d'un élément de bas de page pour le lien hypertexte, cela pourrait changer demain.

Répondre

0

Salut Vous pouvez simplement utiliser cette CHtml::link dans footer

'footer'=> CHtml::link(number_format($totals['status']),Yii::app()->createUrl("Your_Url"),array("target"=>"_blank")), 

Vous pouvez également passer param dans ce

CHtml::link('Link Text',array('controller/action', 
             'param1'=>'value1')); 

Pour plus d'informations s'il vous plaît lire http://www.yiiframework.com/wiki/48/by-example-chtml/#hh0