in reply to HTML::Template Loop Question
This is untested but should get you going in the right direction:
in your script
$template->param( STATE_LOOP => [ { state => 'Alaska', NAME_LOOP => [ { name =>'Judy Jetson'}, { name =>'Barney Rubble' }, ], }, { state => 'TEXAS', NAME_LOOP => [ { name =>'Joe Bloe'}, { name =>'Jane Doe' }, ], }, ], );
<ul> <TMPL_LOOP NAME="STATE_LOOP"> <li><TMPL_VAR NAME="state"> <ul> <TMPL_LOOP NAME="NAME_LOOP"> <li><TMPL_VAR NAME="name"></li> </TMPL_LOOP> </ul> </li> </TMPL_LOOP> </ul>
-enlil
|
|---|