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