Christoph Boget wrote:
>> To recurse, you must include a template that includes itself to
>> trek deeper into the array.
>>
>
> Do you have an example? How do you keep the variables from overwriting
> one another?
>
> thnx,
> Christoph
>
parameters can be assigned to the include file using {include} to avoid
overwriting--example below. - ken
main.tpl:
{include file="recurse.tpl" parents=$tree level=0}
recurse.tpl
{foreach from=$parents item=child}
{$child.name}
{if $child.children}
{include file="recurse.tpl" parents=$child.children level=$level+1}
{/if}
{/if}