Andrew Yager wrote:

If I have a route with the path /foo/:var1/:var2 - the only time it will be matched is when a URL is received in the form '/foo/bar/lah'.

I can set a 'default' value for :var1 and :var2 when creating the route, so I would like to be able to request the URL '/foo' and have :var1 and :var2 automatically set from the default values.

Is this possible?

Yes, as Sebastian already mentioned, you can set the defaults and they will work just like you would like them too. Read the manual.

Problem No 2:

I have occasion to want to be able to call /foo/:var1 where var1 is an arbitary string containing text and the '/' character - e.g. /foo/ lah/de/dah and have it match, and then the controller break :var1 up.

Is this possible? I haven't been able to get it to match again.

One solution (again Sebastian's) is to urlencode a slash and it will be decoded automatically by the router. The other is to use a different type of route for this one problem - eg. a Zend_Controller_Router_Route_Regex. Remember you can mix and match different kind of routes.

Andrew

--
Martel Valgoerad aka Michal Minicki | [EMAIL PROTECTED] | 
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Idleness is not doing nothing. Idleness is being free to do anything." --
Floyd Dell

Reply via email to