> [% FOREACH bldgno = t_data.sort %]
> [% FOREACH roomno = t_data.$bldgno.sort %]
> <B>[% bldgno %] [% roomno %]</B>
> [% t_data.$bldgno.$roomno.title %] ([% t_data.$bldgno.$roomno.csm %])
> [% END %]
> [% END %]
> t_data is a hash that has bldgs as keys, and a hash of rooms as the value.
> The has of rooms contains keys of title and CSM.
your code looks ok to me. can you define what's inconsistent, can you
mock up what t_data looks like?
You might change the t_data building and room structures to a lists of
hash refs, and then you could pass the key parameter to sort and get
back a list of records.
sort, nsort
Returns the items in alpha (sort) or numerical (nsort) order.
[% library = books.sort %]
Where the list contains hash array references, a hash key can be
passed as an argument to specify the sort field.
[% library = books.sort('author') %]
then you'd have cleaner code, like this kinda:
[% FOREACH bldg = t_data.sort('no') %]
[% FOREACH room = bldg.sort('no') %]
<B>[% bldg.no %] [% room.no %]</B>
[% room.title %] ([% room.csm %])
[% END %]
[% END %]
-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-
Richard Tietjen <[EMAIL PROTECTED]> www.pobox.com/~rdtietjen
"Irony is what they make two-edged swords from."
-+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-