I apologize, I posted this question in the symfony-developers group
and I just realize that his place should be here instead of there ...

So I asked the following :

> 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

And these are reponses :

Frank Stelzer  says:

> Hi,

> my solution would be:
> something:
>    url:  /:sf_culture/:class:/:category_slugs/:product_slug
>   param: { module: xyz, action: blah }
>   requirements: { category_slugs: .* }

>  Afterwards explode the category_slugs parameter with "/" and you have
>  all category slugs for this url. This works, as the routing pattern is
>  greedy.

>  - Frank

Then David Ashwood  says :

>  A handy tool to play with & test regular expressions is
>  http://www.ultrapico.com/Expresso.htm
>  Not as good as regExBuddy but free.

And finally I answer :

>  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 (I omited this detail 
> :D ) it should no
>  longer do, doesn't it ?
>
>  PS: Sorry for my bad english !!


Thank's for helping me!
--~--~---------~--~----~------------~-------~--~----~
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