Hi,
I've started using CaptureArgs and PathPart and find them excellent and
easy to use.
I've probably missed something from the docs but does anyone have a best
practice in using uri_for or an alternative for generating url's? the
case I'm having difficulty with is to generate a url with more than one
id such as /artist/*/images/* An example might demonstrate what I'm
trying to achieve:
MyApp::Controller::Artist
sub artist_setup : Chained('/') : PathPart('artist') : CaptureArgs(1) {}
/artist/*
From within MyApp::Controller::Artist uri_for($id, 'show') does the
right thing and produces http://localhost/artist/*/show
MyApp::Controller::Artist::Images
sub images_setup : Chained('/artist/artist_setup') PathPart('images')
CaptureArgs(1) {}
/artist/*/images/*
From within MyApp::Controller::Artist::Images uri_for($id, 'show')
gives http://localhost/artist/images/*/show which does not take into
account the artist id so do I have to build uri_for('/artist',
$artist_id, 'images', $id, 'show') which appears cumbersome.
Any suggestions appreciated,
Alan
_______________________________________________
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/