Thanks,

Now it does what I want it to do. :)

Seems I'll have to look into regex's a bit deeper. Might be able do some nice 
things with it. I do think it'll be difficult to explain the power of routing 
to users who don't have a good grasp of regexes.

Koen 

> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Namens David Zülke
> Verzonden: woensdag 24 januari 2007 13:20
> Aan: Agavi Users Mailing List
> Onderwerp: Re: [Agavi-Users] Generating a RSS feed
> 
> use
> 
> <default for="id">/{1}</default>
> 
> together with that.
> 
> 
> Am 24.01.2007 um 13:18 schrieb Veikko Mäkinen:
> 
> > Van Daele, Koen wrote:
> >> This works, but it leads to url's like: /nieuws//rss
> >>
> >> Still not as elegant as I'd like. Is there a way to make 
> one of those 
> >> slashes disappear if the parameter is not set?
> >
> > There is :)
> >
> > Here's an example:
> >
> > name="foo" pattern="foo(/{id:\d+})?/bar"
> >
> > gen('foo', array('id'=>null)) -> '/foo/bar'
> >
> > gen('foo', array('id'=>2)) -> '/foo/2/bar'
> >
> >
> > -veikko
> >
> >
> > _______________________________________________
> > users mailing list
> > [email protected]
> > http://lists.agavi.org/mailman/listinfo/users
> >
> 
> 
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.agavi.org/mailman/listinfo/users
> 

_______________________________________________
users mailing list
[email protected]
http://lists.agavi.org/mailman/listinfo/users

Reply via email to