Hi,
> url: /getarticle_by_id/:id/:page
> param: { module: xxx, action: zzz }
->
> url: /getarticle_by_id/:id/:page
> param: { module: xxx, action: zzz, page: 1 }
This will do it, however the routing will then generate links in the
form: "/getarticle_by_id/123/1", however "/getarticle_by_id/123" is
callable from extern too.
Frank
Am 08.06.2009 um 19:33 schrieb Campezzi:
>
> Hi Eno,
>
> Not sure if this is the best solution, but nothing stops you from
> creating another rule without the page parameter:
>
> url: /getarticle_by_id/:id
> param: { module: xxx, action: yyy }
>
> url: /getarticle_by_id/:id/:page
> param: { module: xxx, action: zzz }
>
>
> Cheers
> Thiago Campezzi
>
> On Jun 8, 12:58 pm, Eno <[email protected]> wrote:
>> Is it possible to make parameters in routing rules optional?
>>
>> i.e.
>>
>> /getarticle_by_id/:id/:page
>>
>> I want the second parameter (page) to be optional - if it isn't
>> present then the urls will look like /getarticle_by_id/:id and I want
>> my action to retrieve all pages instead.
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---