Re: loop
| From: | Andrei Zmievski | Date: | Thu, 29 Mar 2001 20:58:22 +0000 |
| Subject: | Re: loop | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-501@lists.php.net to get a copy of this message | ||
On Thu, 29 Mar 2001, Ivo Jansch wrote:
> Ow, this is not for the infinite loop problem.. Watch what it does.. if
> a variable has the name 'default', all variables in it get extracted.
> The reason I do this is below:
>
> > > and then have an item.tpl which uses {$url} instead of {$default.url}.
> > > (makes life easier for the template editor).
> > What do you use 'default' for here?
>
> Normally, I pass variables to the template using {include
> file="item.tpl" default=$sec1/data}, and in the item.tpl template, I
> would need to say {$default.name}. But, since default gets extracted,
> {$name} is sufficient.
Hmm, yes, I see how you use it here. I don't know if I really like the
usage of default attribute this way, we'll probably add this to the list
of things to think about though.
-Andrei
We all have photographic memories, it's just
that some of us don't have any film.