4
在backend_dev我与管理发生器模块新闻产生:url_for或的link_to的Symfony
localhost/backend_dev.php/news/2/edit
这是链接编辑新闻ID 2.如何产生这个链接,其他ID?
url_for('news/edit?id=2')
不工作,输出:
localhost/backend_dev.php/news/edit/action?id=1
在路由我只有:
news:
class: sfDoctrineRouteCollection
options:
model: News
module: News
prefix_path: /news
column: news_id
with_wildcard_routes: true
输出是什么? – JamesHalsall
您是否定义了新闻/编辑路线?如果是这样,你可以将它张贴 – JamesHalsall
我只有:newss: 类:sfDoctrineRouteCollection 选项: 型号:新闻 模块:新闻 prefix_path:/新闻 柱:news_id with_wildcard_routes:真 我怎样才能使这个? –