Re: loop

From: Date: Thu, 29 Mar 2001 07:07:32 +0000
Subject: Re: loop
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-490@lists.php.net to get a copy of this message
Hi, Andrei Zmievski wrote: > > I also added a line to _compile_include_tag: > > > > " extract(\$include_vars);\n" . > > " extract(\$include_vars['default']);\n" . // ivo hack > > " include \"\$file_name.php\";\n" . > > > > I did this to cope with the previously discussed nested templates > > problem. > The nested infinite loop has been fixed in 1.3.2. 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. Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl

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