Hello,
great thanks for the template toolkit.
Therefor i have a question. I change an existing application to a mvc one.
Based on "catalyst" and the "template toolkit".
On this point i run into an problem.
I have an recursiv perl structure
$node->{clients}
->{clients}
->{clients}
-> ...
and an (well tested) aquivalent html-structure
<table>
<tr><td><!-- other node attribs --></td></tr>
<tr><td>
<table>
<tr><td><!-- other node attribs --></td></tr>
<tr><td>
<table>
<tr><td><!-- other node attribs --></td></tr>
<tr><td>
...
</td></tr>
<tr><td><!-- other node attribs --></td></tr>
</table>
</td></tr>
<tr><td><!-- other node attribs --></td></tr>
</table>
</td></tr>
<tr><td><!-- other node attribs --></td></tr>
</table>
but i see no template directive to build recursive things like this.
I tried things like
[% BLOCK htmlnode -%]
<table>
[% FOREACH ... %]
<tr><td><!-- other node attribs --></td></tr>
[%# test for recursion end %]
[% IF node.clients.size > 0 -%]
<tr><td>
[% PROCESS htmlnode node="$node.clients" -%]
</td></tr>
[% END -%]
[% END -%]
</table>
[% END -%]
[%# start the recursive output -%]
[% PROCESS htmlnode node="$node" -%]
and so on. But nothing seems to work.
Can anyone help me?
Thanks
--
GMX FreeDSL mit DSL 6.000 Flatrate und Telefonanschluss nur 17,95 Euro/mtl.!
http://dslspecial.gmx.de/freedsl-aktionspreis/?ac=OM.AD.PD003K11308T4569a
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates