2011-05-26 39 views
1

HI, IM使用url如何設置cakephp編輯表單自定義網址?

/controller/action/group_id/id 

訪問我的edit_view但是當我檢查我的訴訟中,僅使用

/controller/action/id 

使用下面的我已經嘗試過。

$params = array('url' => array('controller' => 'controller','action'=> 'action',$group_id,$id)) 
$this->form(model,$params) 

$params = array('url' => '/controller/action/group_id/id') 
$this->form(model,$params) 

但它仍然無法正常工作。

感謝

回答

6

真的不知道什麼是$this->form(),但嘗試:

echo $this->Form->create('SomeModel', array(
    'url' => array(
    'controller' => 'controller', 
    'action' => 'action', 
    $param_1, 
    $param_2 
    ) 
)); 
+0

我想說的是,有CakePHP中沒有'$這個 - > form'。你使用什麼版本? – PawelMysior 2011-05-27 01:37:59