Hello
In my application, the controller needs to receive an id to give a high, simply because I take the parent recording information, and then do the render:
public function actionCreateHijo($id=null){
if (isset($id))
$model=$this->loadModel($id);
else
$model=new CTabMenu;
if(isset($_POST['CTabMenu']))
{
$model->attributes=$_POST['CTabMenu'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$model1=new CTabMenu;
$model1->id_idioma=$model->id_idioma;
$model1->orden=10;
$model1->id_menu_origen=$model->id_menu;
$model1->id_menuBase=$model->id_menu;
$model1->area=$model->area;
$model->unsetAttributes();
$this->render('create',array(
'model'=>$model1,
));
. The problem I have is that when I go to record, the id parameter in the url and still due, instead of recording a new record, modify the parent
I can do away the ID parameter of the URL?, Or? You think of a better way to do it?