Not sure if this would work for you, but this seems to work

[% FOREACH col = ['h.A' 'h.X.Y'] %]
        <TD>
                [% $col %]
        </TD>
[% END; %]

Earl

-----Original Message-----
From: Jamie Echlin [mailto:[EMAIL PROTECTED]
Sent: Friday, September 03, 2004 4:27 AM
To: [EMAIL PROTECTED]
Subject: [Templates] multilevel hash to table


Hi,

I have a multi-level hash that I want to put in a table:

[%
        h.A = "AA";
        h.X.Y = "XY";
%]

[% FOREACH col = ['A' 'X.Y'] %]
        <TD>
                [% h.$col %]
        </TD>
[% END; %]

The X.Y key does not work - is there some special syntax I need to say 
treat this has a hash key to a hash key rather than a string or something?

Thanks, jamie





_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to