[ZPT] Recursive ZPT?

Evan Simpson evan@zope.com
Wed, 21 Nov 2001 12:32:48 -0500


Steve Spicklemire wrote:

> I'm wondering if anyone has successfully built a recursive ZPT. I have a 
> data structure that is "tree like" and I think it makes sense to render 
> it in a tabular form as a recursive call to a template. The idea is that 
> the template would render one level of the hierarchy and call itself to 
> render lower levels.


I wouldn't try this with recursive macro use.  I imagine that the main 
reason you tried to do it that way is to automatically get all of your 
variables available in the recursive part.  You'll probably have to give up 
on this and pass the data you need explicitly in recursive 
tal:replace="structure python:here.foo(v=v)" type calls.

Cheers,

Evan @ Zope