Answer the question
In order to leave comments, you need to log in
Symfony routing.yml, URL generation
Hello everyone, there are 2 modules
company and post,
post is described as follows:
I don’t quite understand how to compose a route in such a way that I would get the url of the form:
If you do this (it won’t work of course):
Then you can specify only 1 model, but how to do it so that 2 models would be used in url generation?
Thank you.
post:
class: sfDoctrineRouteCollection
options: { model: BlogPost }
/company/24/mycompany/show/post/13
post_new:
url: /company/:id/:title/show/:post/:post_id
param: { module: company, action: show }
class: sfDoctrineRoute
options: { model: BlogPost }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question