Namespace for GridView actions

Hello,

I’m trying to use the /site/index for an intro page including several /namespace/admin - views that are put into the zii TabView. I use renderPartial() to include them:




    <?php

    $this->widget('zii.widgets.jui.CJuiTabs', array(

        'tabs'=>array(

            'Customer'=> $this->renderPartial("/customer/admin", array('model'=> Customer::model()),true),

            'Articel'=> $this->renderPartial("/articel/admin", array('model'=> Articel::model()),true),

        ),

        // additional javascript options for the accordion plugin

        'options'=>array(

            'collapsible'=>true,

        ),  

    ));

    ?>



the funny thing is, that paginantion is working in both views… but the rest of the functionallity is not working as it is always send towards the root namespace of the page /site/index

And not to the view related namespace /customer or /articel …

How can I define a default namespace for the update/delete/edit actions in cgridview? Or do I have to rewrite the CButtonColumn and define the actions url?

Thank you very much in advance!

Cheers Phil

Just to myself: RDFM!

Here is the solution:




<?php

$this->widget('zii.widgets.grid.CGridView', array(

  'dataProvider'=>$dataProvider,

  'columns'=>array(

    'attribute1_name',

    'attribute2_name',

    array(

      'class'=>'CButtonColumn',

      'viewButtonUrl'=>'Yii::app()->createUrl("/controllername/view", array("id" => $data->model_id))',

      'deleteButtonUrl'=>'Yii::app()->createUrl("/controllername/delete", array("id" => $data->model_id))',

      'updateButtonUrl'=>'Yii::app()->createUrl("/controllername/update", array("id" => $data->model_id))',

    ),

  ),

));

?>