Re: loop
| From: | Ivo Jansch | Date: | Tue, 27 Mar 2001 14:28:43 +0000 |
| Subject: | Re: loop | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-451@lists.php.net to get a copy of this message | ||
Hi,
Andrei Zmievski wrote:
> > I can see the bullets, but no names..
> Because Smarty first indexes by section iteration and then by string
> keys..
Hmm, I was hoping I could use arbitrarily complex datastructures..
The reason I need this is: in the case we discussed before, with the
nested item template, there is a loop inside the item template..
We had this:
{section name=mysection loop=$yourbookmarks}
{include file="item.tpl" table=$mysection/yourbookmarks}
{/section}
Then item.tpl can be:
<a href="{$table.url}">{$table.name}</a>
but in one case name was an array of names and I wanted to make a
section out of it, which is impossible.
I am trying to use Smarty as part of a generic website framework, in
which datastructures and templates can be deeply nested, but I think I'm
going to need to change Smarty a lot before I will be able to do this,
since apparently not every combination of sections, includes and
datastructures is possible.
--
Ivo Jansch <ivo@ibuildings.nl>
ibuildings.nl BV - information technology
http://www.ibuildings.nl