Hi David, Thanks for the suggestion. I'll do as you say.
Vikram On Wed, Jan 7, 2009 at 12:38 AM, David Zülke <[email protected]> wrote: > Do that with query string arguments, not in the route. You could do it > exactly the same way you are doing the "page" argument, but then you run > into ambiguities - more than one optional fragment in a route after another > is not really a good idea. > > HTTP is designed to represent resources. To get alternative representations, > filters, sorting options on these resources, a query string should be used. > I know (and agree) that having a "page" part inside the path is nicer, but > if you want to do it 100% right, you should put even that one into a query > string. > > - David > > > On 06.01.2009, at 19:10, [email protected] wrote: > >> Hi all >> >> I have the following route defined, for paging: >> >> <route name="author.index" pattern="^/author/index(/{page:\d+})?$" >> action="Author.Index"> >> <defaults> >> <default for="page">1</default> >> </defaults> >> </route> >> >> I'd like to modify this to also include optional 'sort' and >> 'direction' parameters. Could you help me with the code? I'm not very >> good with regex - I tried a few options but kept getting a 404 error >> on accessing the page. >> >> TIA, >> >> Vikram >> >> _______________________________________________ >> users mailing list >> [email protected] >> http://lists.agavi.org/mailman/listinfo/users >> > > _______________________________________________ users mailing list [email protected] http://lists.agavi.org/mailman/listinfo/users
