I am trying to sort out some interdependent chains and I'm having trouble figuring out why the urls I'm trying to build aren't working out.

I have a site where the primary objects of interest are flash-based tutorials. Each tutorial can have comments, and each comment can have replies. I'm using jQuery to manipulate comments in a REST fashion, and I'm aiming for a url map like this:

/tutorials # GET a list of tutorials, or POST a new tutorial
/tutorials/*                       # GET/POST/DELETE a specific tutorial
/tutorials/*/comments # GET the comments for a tutorial, or POST a new comment
/tutorials/*/comments/*            # GET/POST/DELETE a specific comment
/tutorials/*/comments/*/replies # GET the replies for a comment, or POST a new reply
/tutorials/*/comments/*/replies/*  # GET/POST/DELETE a specific reply

But the best I've been able to come up with is this:

 /tutorials
^tutorials/(\d+)$
/tutorial/*/comments
/tutorial/*/comment/*/replies
/tutorial/*/comment/*/reply/*

missing: /tutorial/*/comment (what would I call it? /tutorial/*/cmt ?)

Essentially I'm hitting an issue with is due to the (seeming?) impossibility of matching a chained set of actions at multiple url depths. Is it possible to build the url structure I'm looking for above using chained actions?

thanks,
Stephen
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to