[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] Re: recursion in templates
From: |
totschnig . michael |
Subject: |
[Phpgroupware-developers] Re: recursion in templates |
Date: |
Fri, 27 Sep 2002 18:47:50 -0400 |
User-agent: |
Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.4 (Economic Science, i686-pc-linux) |
address@hidden a écrit:
>> When you create a block, that block is stored as a variable within the
>> Template class. The Template class doesn't do the recursion, of course, but
>> your recursive routine can keep expanding a variable in the template with
>> block pieces to get the nested effect I assume you are looking for.
>
> that is what I tried, but the problem I ran into, was that when
> setting up the inner blocks, I mess-up the variables set for the outer
> blocks. I have the impression that to have a recursive document, I
> would need different variables for each recursion level, and that the
> template class does not provide this.
I finally found the solution of the problem. The recursive function has
to create a new instance of the template class. My error was that I
tried to work with only one Template object. Alex advice to have the
nested structure in a seperate file also helped. Thanks to both of
you!
Michael