Re: [SMARTY] Problem with unregister_outputfilter

From: Date: Mon, 22 Jul 2002 14:30:49 +0000
Subject: Re: [SMARTY] Problem with unregister_outputfilter
References: 1 2 3 4 5  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5380@lists.php.net to get a copy of this message
wherever you call load_file(), I'd pass a parameter that says whether or not to load it. So maybe something like this if you extend the class: class My_Smarty extends Smarty ($trimwhitespace=true) { if($trimwhitespace) { $this->load_filter('output','trimwhitespace'); } } Then in your script, to avoid the output filter: $smarty = new My_Smarty(false); Bertrand DUNOGIER wrote:
MO> Woudn't it make more sense to only load the filter when you need MO> it? Hmmm, maybe. But email text bodies are the only place where i DON'T need it. I use it everywhere else, and my display() is not everytime in the same file. Bertrand
-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.

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