[Catalyst] PathPart help
Christopher H. Laco
claco at chrislaco.com
Thu Nov 15 20:01:08 GMT 2007
Les Fletcher wrote:
> I have question about setting up PathPart's and Chaining. I am trying
> to set something that has the following look:
> /namespace/ =3D> This lists out a list of objects
> /namespace/<id> =3D> displays detail information about the object with the
> numeric id=3D<id>
> /namespace/<id>/edit =3D> brings up a form to edit object with numeric
> /namespace/create =3D> brings up a form to create a new object
> When the Chained actions are printed out everything looks fine, but when
> I goto "/namespace/create" it matches the "/namespace/<id>" view
> action. Needless to say, there isn't an object with the numeric id of
> I would like for Catalyst to try and match the explicit PathPart before
> matching the wild card that is <id>. Any thoughts on best ways to get
> around this?
> A couple of ways I thought of were:
> I could make the view path be "/namespace/<id>/view," it seems a little
> weird, but would be acceptable if need be.
> I could have an action that matches "/namespace/*" and then forward to
> the create action if "*" is "create" and to the view action other wise,
> but this could limit my ability to further chain from here.
> Catalyst just might not match the paths in a way that is conducive to
> this, but just thought I'd throw this out there.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20071115/33c2=
More information about the Catalyst