[Catalyst] Using a post argument in a template

James S. White james at jameswhite.org
Fri Jul 25 16:02:47 BST 2008


nevermind. this works. I am an idiot. It helps if the array isn't empty...

On Fri, 25 Jul 2008, James S. White wrote:

> I can stash and array and when I use [% c.stash.mylist %] in the template,
> it prints 'ARRAY(0x94023b0)' but if I try:
>
> [% FOREACH element IN c.stash.mylist %]
> [% element %]
> [% END %]
>
> the output is null. I'm sure I'm missing something here, I just don't know what.
>
>
> On Fri, 25 Jul 2008, Tomas Doran wrote:
>
> >
> > On 25 Jul 2008, at 14:50, James S. White wrote:
> >
> > > I did. I want to use it as a variable even though it's passed in as
> > > an arg.
> > > I didn't mean to be unclear, sorry. Once it's stashed, can I use it
> > > like
> > > [% myarg %] in a template? or [% c.stash.myarg %]?
> > >
> >
> > Yes, either.
> >
> > 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/
>




More information about the Catalyst mailing list