[Catalyst] Help System - Can a controller's index capture the remainder of the path as a series of arguments?

Bill Crawford billcrawford1970 at gmail.com
Thu Mar 31 16:21:45 GMT 2011


sub help : Chained('/') Args {
    my ( $self, $c, @path ) = @_;

    my $path = join('/', @path);
    ...
}

On 31 March 2011 17:12, Kyle Hall <kyle.m.hall at gmail.com> wrote:
> Hello All,
>
> I'm trying to a help system to my catalyst app. My idea is to have a
> help button. If we are currently at /foo/bar, the help buttons uri
> becomes /help/foo/bar. My idea is that the the Help controllers index
> will capture everything after /help ( hopefully as an array ). This
> data will then be used to look up and display the correct help file (
> just a tt template ). So, if the help button is currently pointing to
> /help/foor/bar, the system will display the template located at
> /help/foo/bar.tt.
>
> Can this be done? Is there a much better way to handle this that I
> have not seen or thought of?
>
> Thanks,
> Kyle
>
> http://www.kylehall.info
> Mill Run Technology Solutions ( http://millruntech.com )
> Crawford County Federated Library System ( http://www.ccfls.org )
> Meadville Public Library ( http://www.meadvillelibrary.org )
>
> _______________________________________________
> 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