[Catalyst] Dynamic Argument count

Christoph Friedrich christoph at christophfriedrich.de
Tue Jan 12 08:26:29 GMT 2010


No not really ^^

Sry that I didn't list the chains.
I have following chains:

sub base : Chained('/') PathPart('/guild') CaptureArgs(2) {}
sub list_guilds : Chained('base') PathPart('') Args(0) {}

And in the end sub I want to check if there is a Ajax Parameter and then =

send the stash to the JSON View instead of the TT View.

Greets
Christoph

Tomas Doran schrieb:
>
> On 11 Jan 2010, at 23:00, Christoph Friedrich wrote:
>> following given:
>>
>> URL: http://localhost:3000/guild/myrealm/myguild
>> =3D> Controller: guild
>> =3D> Action: list_guilds (chained, CaptureArgs(2))
>>
>> URL: http://localhost:3000/guild/myrealm/myguild/ajax
>> =3D> Controller: guild
>> =3D> Action: list_guilds (chained, CaptureArgs(3))
>
> ^^ Erm, this doesn't make much sense - you're not showing what things =

> are chained to, which makes a big difference..
>
>> My problem is following: I want to add the parameter "ajax" (for =

>> example) directly to the url and not as a query parameter. Is there a =

>> possible way or do I have to add this parameter to the query?
>
> sub base : Chained('/') PathPart('/guild') CaptureArgs(2) {}
> sub list_guilds : Chained('base') PathPart('') Args(0) {}
> sub list_guilds_ajax : Chained('base') PathPart('ajax') Args(0) {}
>
> Is that what you want?
>
> Cheers
> t0m
>
>
> _______________________________________________
> 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/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: christoph.vcf
Type: text/x-vcard
Size: 147 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100112/5029=
c05a/christoph.vcf


More information about the Catalyst mailing list