Hi,

our company would like to switch to Symfony2 as its major development
platform, so we are currently evaluating it against our needs. As far
as I can seen the following needs regarding routing might be
problematic with Symfony2:

1. Routing of nested slugs
Imagine we have a entity called "document", that is organised
hierarchically, so each document (except the root) has a parent
document. Now we would like the route to a controller displaying this
document a combination of the slugs of all documents along the path.
Example:
"homepage" => /
  "about-us" => /about-us/
    "team" => /about-us/team/
  "news" => /news/
...

The result of the rout /about-us/team/ should then be something like
{_controller: documentDisplayController, id: 17}, with 17 being the id
of the document with the slug "team". Also, calling "generateUrl" with
something like ('documents', array('id' => 18)) should give "/
news/" (with 18 being the id of the document with the slug "news"..).

2. Routing nested routes
At the moment we are able to define routes, that are kind of "below
other routes". Example (our current routing syntax is kind of similar
to Symfony2, the @ refers to a route being already defined):
homepage:
  pattern: /
  defaults: {_controller: homepageController:index}
extranet:
  pattern: @homepage/extranet/
  defaults: {_controller: extranetController:index}
  requirements:
    _scheme: https
extranet-news:
  pattern: @extranet/news/
  defaults: {_controller: extranetController:news}


With this, it would be possible to call the following urls:
/                          => {_controller: homepageController:index}
/extranet/            => {_controller: extranetController:index,
_scheme: https}
/extranet/news/   => {_controller: extranetController:news, _scheme:
https}


I know that you can enforce https for a whole part of your website
with the security component, but I just wanted to give a quick example
of a route default / requirement being "inherited".

Could anyone being more into Symfony2 routing comment on this?

Kind regards,
Per

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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

Reply via email to