Re[2]: [SMARTY] Recursion, include, and {section}
| From: | Bertrand DUNOGIER | Date: | Tue, 30 Jul 2002 20:56:55 +0000 |
| Subject: | Re[2]: [SMARTY] Recursion, include, and {section} | ||
| References: | 1 2 3 4 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5519@lists.php.net to get a copy of this message | ||
KY> I'll try it, but it seems on its face to be no different. The
KY> manual says that nested {foreach} loops need distinct names, too,
KY> and you haven't done that here.
Hmmm, i'm amazed, since it works perfectly. If i'm not wrong, when you
set a parameter using param=value in the {include} tag, this parameter
is considered as local scope for the include. So you get a different
variable in every instance of the included file.
Even if $ARRAY_TREE exists in the parent template, it looks like the
one given as a parameter to the include overwrites this one, so it
works. In fact, it is not exactly nested foreach loops, but rather
nested includes... it's not exactly the same thing.
You can see a screenshot of this tree on:
http://www.katana-inc.com/screenshots/CMS.png.
There is no online version of this tool available at the time being.
Bertrand