-- agatone <[EMAIL PROTECTED]> wrote
(on Wednesday, 27 June 2007, 08:54 AM -0700):
> I'm sorry but I had to make this post, cuz I don't know what to read anymore
> and i'm getting more and more lost.
>
> Problem:
> Let's say I have application at http://exmpl.com/.
>
> Now this application has several modules:
> http://exmpl.com/news/
> http://exmpl.com/blog/
> http://exmpl.com/gallery/
> etc.
>
> What I don't understand how passing params thru URL's work. As I seen it
> says default it's something like this
>
> http://exmpl.com/gallery/id/12/user/15/ - (id = 12, user = 15)
> http://exmpl.com/blog/cat/12/
> http://exmpl.com/blog/id/112/
No, that won't work. The default route is:
[:module/]:controller/:action/*
which means that if you want to pass params via the URL, you need to
specify *each* of the module, controller, and action:
http://exmpl.com/gallery/index/index/id/12/user/15
module cntrl actn
A limitation of the '*' wildcard is that all the preceding elements must
be present for it to match.
Another option is to create a route like this:
:module/*
which would allow for the URLs you have above, but would preclude the
idea of :controller/:action or :module/:controller or
:module/:controller/:action as routes.
You may want to rethink your URL schema slightly, and/or create custom
routes for each module.
--
Matthew Weier O'Phinney
PHP Developer| [EMAIL PROTECTED]
Zend - The PHP Company | http://www.zend.com/