Hi,

Sorry about this basic question, but I am kind of lost when it comes to chained dispatching.

I have a controller "Members::Profile" with methods "edit" and "images".

I would like "edit" called with the URL "/members/profile/edit", and "images" and *after that* "edit" called with "/members/profile/edit/images".

I thought this should look something like as:
sub edit: Local Args(0) { ... }
sub images: PathPart('images') Chained('edit') { ... }

But obviously I misunderstand something.

I have also tried:
sub edit :PathPart('edit') Chained('') CaptureArgs(0) { ... }
sub images :PathPart('images') Chained('edit') Args(0) { ... }

I guess this clearly shows I just have no idea how this is supposed to work :)

It actually works if I add another method like this:
sub edit :PathPart('members/profile/edit') Chained('/') CaptureArgs(0) { ... }
sub images :PathPart('images') Chained('edit') Args(0) { ... }
sub root : PathPart('') Chained('edit') Args(0) { ... }

This kind of looks logical, but it don't think this is what I should do: I don't like the PathPart for edit, and the extra method either.


So how do I do this properly?

Thanks,
- Fagzal



_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to