May this is the better way to do it ... Thank you ! I apologize for posting my question in this group, I just realized that it should be in the symfony-user group so I transfer each answers and my question there : http://groups.google.fr/group/symfony-users/browse_thread/thread/9f25259c3f76205d#
Thank you again! __________________________________________ Benjamin Grandfond - www.benjamingrandfond.fr [email protected] Le 12 mai 09 à 20:46, Frank Stelzer a écrit : > > In this case you can create an additional "fallback" route, besides > the route with the category slug, which points to the same action. > This will work in any case, without spending too much time in the > routing stuff. > > > something_without_slug: > url: /:sf_culture/:class:/:product_slug > param: { module: xyz, action: blah } > > something: > url: /:sf_culture/:class:/:category_slugs/:product_slug > param: { module: xyz, action: blah } > requirements: { category_slugs: .* } > > > - Frank > > > Am 12.05.2009 um 20:30 schrieb Benjamin Grandfond: > >> >> Sorry, you are right I need regular exrepssion's lessons ... Of >> course >> it doesn't work ... >> Thank's for giving me this [windows] tools, I realized my syntaxe was >> wrong! I should not use \d !!! >> >> But my question still unanswered, because event if the Frank's >> solution must work, if the product hasn't a category it should no >> longer do, doesn't it ? >> >> PS: Sorry for my bad english !! >> __________________________________________ >> Benjamin Grandfond - www.benjamingrandfond.fr >> [email protected] >> >> Le 12 mai 09 à 20:09, David Ashwood a écrit : >> >>> >>> A handy tool to play with & test regular expressions is >>> http://www.ultrapico.com/Expresso.htm >>> Not as good as regExBuddy but free. >>> >>> -----Original Message----- >>> From: [email protected] [mailto:[email protected] >>> ] >>> On Behalf Of BenjaM1 >>> Sent: 12 May 2009 17:48 >>> To: symfony developers >>> Subject: [symfony-devs] Routing requirement multiple instance of a >>> parameter >>> >>> >>> Hy everybody, >>> >>> I need some help for routing problem. >>> >>> I want to write a route as >>> http://my.website.com/en/racket/junior/competition/myracket.html >>> so the url must looks like >>> >>> url: /:sf_culture/:class:/ >>> category_slug/:category_slug2/:product_slug >>> >>> but I can't anticipate the number of category that I can have for my >>> racket, so i rewrite the url like that >>> url: /:sf_culture/:class:/category_slug/:product_slug >>> ... >>> requirement: >>> category_slug: \d* >>> >>> But it seems that it doesn't work. How can I do that ? >>> >>> Thank you. >>> >>> PS: I apologize if this question has already been asked and >>> answered, >>> I haven't really time to search farther >>> >>> >>> >>>> >> >> >>> > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
