> > But it does not work, since HTML::Template recursively includes > > thread.html an infinite number of times (or max_includes times) when the > > template is created, not when the template is evaluated. > > Solution 1: Since you have the recursive structure, you could build the html > in code and output it. > > Solution 2: Solution 1 suffers from the separation of code and html, so you > could use a filter which merely adds a '<tmpl_include ...>', but you'd have > to know when to stop, ... > > Solution 3: ... > > Solution 4: ...
I might not have understood your suggestions correctly, but as far as I can se, all of them put heavy demand on memory since the function is recursive, and in worst case can be as deep as 50 levels. There might be a way to do recursive templates without the TMPL_INCLUDE-statement? (I can, of course, do a hard-coded nested TMPL_LOOP, but that will limit the recursion to the number of nested loops i enter in the template.) Stefan
smime.p7s
Description: S/MIME Cryptographic Signature
