Recursive sections
| From: | Bertrand DUNOGIER | Date: | Thu, 28 Feb 2002 14:46:41 +0000 |
| Subject: | Recursive sections | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2893@lists.php.net to get a copy of this message | ||
Hi,
i'm working on a template which displays a folder tree from a
multidimensionnal array.
I use a template which looks like this:
{section name=tree loop=$FOLDERS_TREE}
{$FOLDERS_TREE[tree].level|multiplify:"<img
src='/gfx/foldertree/vertical.gif'>"}<img
src='/gfx/foldertree/plus.gif'><a
href='{$FOLDERS_TREE[tree].link}'>{$FOLDERS_TREE[tree].label}</a><br>
{if $FOLDERS_TREE[tree].tree}{include file=images/folderstree.tpl
FOLDERS_TREE=$FOLDERS_TREE[tree].tree}{/if}
{/section}
The problem is that it only displays one level...
it is probably a variable scope issue but i don't have time to dive
into the code right now...
any way i could fix this ?
--
Best regards,
Bertrand mailto:bdunogier@wanadoo.fr