I already gave a small answer on twitter but I repost here... If I correctly understand the problem you have: You can add custom parameters (ex: myParameter) to routes as long as there is a method in your model named (in this case) getMyParameter().
Please tell me if it does fix your problem :-) Le 26 août 09 à 13:02, Nicolas Perriault a écrit : > > Hi all, > > I'm trying to figure how I could benefit from the great features > provided by the admin generator (I'm using symfony 1.3 right now) > while using specific urls ; let me explain a bit. > > I have two models: Project and Story. A project can have many stories, > and a story has one project. I would like to generate a an > admin-generated module to handle the stories related to a given > project by using a sexy url like this one: /project/:project/backlog, > where the :project parameter would be a slug or a pk, no matter. > > I tried to use the prefix_path setting of the route collection in the > routing.yml file, by setting this: > > story: > class: sfDoctrineRouteCollection > options: > model: story > module: story > prefix_path: project/:project/backlog > column: id > with_wildcard_routes: true > requirements: > project: \d > > But when the route matches, an InvalidArgumentException is thrown when > the admin generated templates try to generate the links to the other > module actions, because it lacks the :project parameter: > > The "/project/:project/backlog/:action/action.:sf_format" route has > some missing mandatory parameters (:project). > > I also tried to play with the route_prefix setting from the > generator.yml file but with no luck so far. > > Usually I dive into code to find a path to solve this kind of > problems, but today I'm unfortunately into such a hurry that I just > can't loose time on this; so I'd be glad to got some help from the > community if you've been ever exposed to an approaching situation or > have an idea to solve it ;) > > Cheers, > > -- > Nicolas Perriault > http://prendreuncafe.com - http://symfonians.net > Mobile: +33 660 92 08 67 > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---