Re: [SMARTY] two problems translated

From: Date: Fri, 19 Apr 2002 14:45:54 +0000
Subject: Re: [SMARTY] two problems translated
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3816@lists.php.net to get a copy of this message
> That's because Smarty doesn't know what variables the template has until > you call display() or fetch(). That's when compilation happens. Well, if the compilation is "modular enough" you can throw in a new function to run a simple regex on the template to find all variables used in it. Getting variables from included templates and other weird sources is a complicated question though... BTW I have written a simple extension function myself, when I needed that functionality. It was easy, because I could say, that I only use those vars I need to get from the template in simple substitution, and I have not use includes in those templates. This was a very simple situation, so the solution is not too elegant and general... Goba

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