I have 2 database tables, yii_quote & yii_valuation. A quote contains 0:M valuation. The models have been scaffolded accordingly.
When a user is at the
Where
How do I add this dynamic parameter to the URL?
At present, I have:
When a user is at the
Quote/admin CGridView, and they click View from the default CButtonColumn, I wish to override the default behaviour of the view button to direct them to
Valuation/Admin?q=:quote_id
Where
:quote_idis the id of the quote / current row id.
How do I add this dynamic parameter to the URL?
At present, I have:
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'quote-grid',
'dataProvider'=>$model->search(),
'columns'=>array(
...
... Quote Related Columns ...
...
array(
'class'=>'CButtonColumn',
'buttons' => array(
'view' => array (
'url' => "Yii::app()->controller->createUrl('valuation/admin', q= // SOMETHING HERE // )",
),
),
),
),
)); ?>