4
votes

in backend_dev i generated with admin generator module News:

localhost/backend_dev.php/news/2/edit

this is link for edit News ID 2. How can i generate this link for other ID?

url_for('news/edit?id=2')

doesnt work, output is:

localhost/backend_dev.php/news/edit/action?id=1

In routing i have only:

news:
  class: sfDoctrineRouteCollection
  options:
    model:                News
    module:               News
    prefix_path:          /news
    column:               news_id
    with_wildcard_routes: true 
1
have you defined a route for news/edit? if so can you post itJamesHalsall
i have only: newss: class: sfDoctrineRouteCollection options: model: News module: News prefix_path: /news column: news_id with_wildcard_routes: true How can i make this?Marques Milpi

1 Answers

6
votes

Your route has defined the identifier column as news_id, so try changing your url creation to

url_for('news/edit?news_id=2')