将参数从 Index 传递到 New (Symfony 1.2)


Passing parameter from Index to New (Symfony 1.2)

当我从列表中单击链接"New"(indexSuccess)时,我需要新操作(executeNew)可以接收参数"'commercer_id=' .$commerce_id"。谢谢。

试试下面,

apps/frontend/config/routing.yml

index:
  url:   /New/:commercer_id
  param: { module: index, action: new }

在锚点 src 中使用波纹管功能

url_for(array(
  'module'   => 'index',
  'action'   => 'new',
  'commercer_id'=>$commercer_id,
))

阅读有关路由器的更多信息

希望对您有所帮助!