Re: [SMARTY] Recursion, include, and {section}

From: Date: Tue, 30 Jul 2002 20:17:35 +0000
Subject: Re: [SMARTY] Recursion, include, and {section}
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5517@lists.php.net to get a copy of this message
KY> Problem is, the template contains a named {section}, and the KY> recursive include is inside that {section}. This results in nested KY> sections with the same name. This is futzing up the loops, as the KY> Smarty manual predicts. I managed to fix this using foreach and a local variable in my {include}. Something like: {foreach from=$TREE_ARRAY item=TREE} ... {include file=$SELF TREE_ARRAY=$TREE_ARRAY.tree} ... {/foreach} ($TREE_ARRAY.tree contains each time exactly the same structure, of course) Hope it helps, Bertrand

« previous php.smarty.general (#5517) next »