Pádraic, thank you for your reply! Ok, I will explain a bit further what I am looking for...
My application is a simple database based CMS and its main function is to manage a website. I want that users can easily remember the urls of its main sections and at the same time I want to publicize those sections separatedly because they have different targets in the same community. Therefore I don't want to rely on ids for the urls (they are not easy to remember). I prefer the user to type for example "www.recipesexample.com/recipes/sauces" and get the sauces subsection of the recipes section or "www.recipesexample.com/community/forums/lifestyle" and get that specific 3rd level subsection. At the same time the CMS has its own modules that handle everything and its ok for me to handle them as default by routes like "www.recipesexample.com/module/controller/action". And finally, users may have a public personal page in "www.recipesexample.com/user_x". Pádraic Brady wrote: > > The first case is the default match for any route. > Ok. But as long as I add a route trying to handle cases 2 and 3, the application doesn't respond to "www.recipesexample.com/controller/action" from the default module anymore. I must explicitly type "www.recipesexample.com/default/controller/action". This is surely because the router I am trying to add is not ok. I'm an amateur programmer and learn by seeing examples and doing. Pádraic Brady wrote: > The second can map to any controller/action pair just like the first part > - it doesn't need a database lookup, just have a matching > module/controller/action or it will automatically divert to the > ErrorController. It's a database based website, therefore I want to look for the "/recipes/sauces" section in the database and show this section to the user. "Recipes" and "sauces" are neither modules nor controllers or actions. Besides, "/recipes/sauces" is not a parameter/value pair. It is a route to a section of the web. I want to be able to have more levels of depth and don't want to add question marks, or other punctuation signs in the url. Pádraic Brady wrote: > The third case is still no different - add a route to a controller > handling users, and include in it a possible parameter for the username. Ok. I have read the documentation and examples on the Internet and still don't know how to do that. Again, I don't want the users having to type "user=maryjo", but "www.recipesexample.com/maryjo". Thanks again and sorry for my poor English. Oriol -- View this message in context: http://www.nabble.com/A-router-that-reacts-to-three-different-possibilities...-tp25722083p25729744.html Sent from the Zend Framework mailing list archive at Nabble.com.
