Re: [SMARTY] assign in included files

From: Date: Fri, 17 May 2002 18:55:48 +0000
Subject: Re: [SMARTY] assign in included files
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-4283@lists.php.net to get a copy of this message
What if we did this: {assign var="foo" value="bar" scope=global} and if scope is global, assign this variable to both the current $_tpl_vars and the saved $_tpl_vars? Or is this method of scope saving handled ideally in the first place? Andrei Zmievski wrote:
The reason that variables assigned in a subtemplate are not accessible to the parent one is because subtemplate has its own scope. The $_tpl_vars are saved before smarty_include() is called and then restored. It's not a bug, it's a design issue. -Andrei
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

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