2013-01-08 19 views
0

我用CButtonColumn這個樣子:自定義CButtonColumn

<?php $this->widget('zii.widgets.grid.CGridView', array(
      'id'=>'user-grid', 
      'dataProvider'=>$model->search(), 
      'filter'=>$model, 
      'pager' => array(
       'firstPageLabel' => '&lt;&lt;', 
       ), 
      'columns'=>array(
       'username', 
       'name', 
       'email', 
       'creationDate', 
       array(
         'class' => 'CButtonColumn', 
         'template' => '{change} {view}', 
         'button' => array(
          'change' => array(
           'url' => 'aaaaaaaa', 
          ), 
        ), 
       ) 
      ), 
     )); ?> 

,我得到了一個錯誤:

Use of undefined constant aaaaaaaa - assumed 'aaaaaaaa'

我怎麼能cusomize CButtonColumn正確?

回答

0
'url'=>'Yii::app()->createUrl("your_controller/action")', 
+0

我需要的URL設置爲其他外​​部頁面。我可以像這樣使用http鏈接:'http:// test.com/user/view/id/24'嗎? – Chalist