I would like to see support for parameters in general in prefixes.

We are setting up a multi tenancy system where we would like all urls
in the system to be prefixed with the organisation's slug, similar to
Alessandro's requirement for _locale. Currently we have added the slug
to each bundle's set of routes:

/inventory/{org}/* (inventory is the prefix from routing.yml, org is
added as part of the InventoryBundle's routing.yml)
/reporting/{org}/*

where we would like:
/{org}/inventory,  /{org}/reporting etc as the prefix in routing.yml
(along with defaults etc)

Regards,

MB

On Jun 1, 5:05 pm, ivarne <[email protected]> wrote:
> The prefix approach does not work because the routing compiller tries to
> optimize the prefix if more than one route is included. This means the
> imported routes are surounded by a if(0===strpos('{_locale}')), whitch wont
> match and you'll get a 404. If there is only one route in the included file,
> it kind of works but the requirements will not be used, so your locale can
> be set to anyting not containing a "/".
>
> I think the routing system should be modified so that it would support
> adding a global {_locale} parameter. I would hate to use ctrl-c clrl-v in 5
> different files in five different bundles if I am to add a language to the
> site, and your syntax is a clean way to specify it globally.

-- 
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 developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to