RE: [Templates] multilevel hash to table

[prev] [thread] [next] [Date index for 2004/09/03]

From: Cahill, Earl
Subject: RE: [Templates] multilevel hash to table
Date: 17:20 on 03 Sep 2004
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:jechlin@xxxxxxxxxxxxxx.xxx]
Sent: Friday, September 03, 2004 4:27 AM
To: templates@xxxxxxxxxxxxxxxx.xxx
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
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

RE: [Templates] multilevel hash to table
Cahill, Earl 17:20 on 03 Sep 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52