On 10/22/2009 08:15 PM, Felipe Gasper (cPanel) wrote:
> Dave Cross wrote on 22 10 2009 1:52 PM...
> > On 10/22/2009 07:31 PM, Felipe Gasper (cPanel) wrote:
> >> Hi all,
> >>
> >> What is the syntax I am looking for here?
> >>
> >> -----
> >> FOR key = hash.keys;
> >> "The value for $key is ${hash.$key}.";
> >> END;
> >> -----
> >>
> >> The above syntax produces errors....I assume there is a way to
> do what
> >> I want to do?
> >
> > [% FOR key = hash.keys -%]
> > "The value for [% $key %] is [% hash.$key %].";
> > [% END -%]
>
> This isn't what I mean....though I should have been clearer in my example.
>
> What I want is to have this all in TT code. The code you give works, but
> it has multiple TT directives.
>
> In other words, I want:
>
> [%
> FOR key = hash.keys;
> "The value for $key is ${hash.$key}.";
> END;
> -%]
[% FOR key = hash.keys;
"The value for $key is "; hash.$key;
END -%]
Dave...
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates