Some of my top-level controllers represent different, er... "major pieces" of my application. They have, among other things, different default views, which are mainly just for configuring different page wrappers. These controllers have this action pattern:

package MyApp::Admin;
sub base : Chained('/') : PathPart('admin') : CaptureArgs(0) { ... }
sub index : Chained('base') : PathPart('') : Args(0) { ... }

package MyApp::Survey;
sub base : Chained('/') : PathPart('survey') : CaptureArgs(0) { ... }
...etc...

Requests for non-extant paths fall through to Root->default(), which gives the (undesired) default root view. I tried giving my top-level controllers their own default() methods, but as others have found [1], 'default() : Path' has precedence over 'index : Chained'. Otherwise, I get the appropriate view with 'Page Not Found' content for bad urls, e.g. /admin/blargh or /survey/123/nurgle

I am looking for suggestions/solutions to get the desired behavior.

Changing index() to 'index : Path' is not a viable option.


Thanks,
--Trevor

[1] http://www.gossamer-threads.com/lists/catalyst/users/24883

_______________________________________________
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