[Catalyst] Catalyst Actions precedence

Kieren Diment diment at gmail.com
Thu Feb 28 11:13:00 GMT 2013




On 28/02/2013, at 21:43, Nick Anderson <nick at webcraftcs.com> wrote:

> 
> 
>>> I presume then, that having a /*/... wildcard action to catch everything else is not advisable? Is using the default action the preferred method then to allow for unknown/dynamic URLs where an application defined action is unavailable?
>> 
>> The usual thing to do with default is to catch 404 errors.
>> 
>> 
> 
> If the default action should only really be used for 404 errors, how should one cater for URLs where the full path is dynamic and no part of it matches a controller (chained) action? Is this inadvisable?
> 

No, I said the usual thing. If you want to do something else, that's probably fine too. 


> For example, I started having:
> 
> /pages/mypage1
> 
> with the controller/action match on "pages". But then I decided that it would be nicer to eliminate the "pages" part (indeed one of my clients expressly requested it be removed!):


You could alter the controller namespace, or the path part the chain matches, or make a base controller to remap specific controllers. 

> 
> /mypage1
> 
> 
> Thanks,
> 
> Nick
> 
> _______________________________________________
> List: Catalyst at 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/



More information about the Catalyst mailing list