On Thu, Oct 22, 2009 at 12:15 PM, Felipe Gasper (cPanel)
<[email protected]>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;
> -%]


Doesn't that work?

This works for me.

[%
    FOR  key = hash.keys;
       "The value for $key is ${hash.$key}\n";
    END;
%]




-- 
Bill Moseley
[email protected]
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to