RE: Prefilters & Assign

From: Date: Sun, 10 Mar 2002 12:14:30 +0000
Subject: RE: Prefilters & Assign
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3003@lists.php.net to get a copy of this message
I guess it's because the prefilter actually is called from a compiler object. To get around this "problem" locate the "_compile_template" function in Smarty.class.php, and replace the lines: if ($smarty_compiler->_compile_file($tpl_file, $template_source, $template_compiled)) return true; with this: if ($smarty_compiler->_compile_file($tpl_file, $template_source, $template_compiled)) { array_merge($this->_tpl_vars, $smarty_compiler->_tpl_vars); return true; } I haven't tested this, but I'm sure it will work. /Karto -----Original Message----- From: Andreas Heintze [mailto:andreas.heintze@home.se] Sent: 10. marts 2002 11:55 To: smarty@lists.ispi.net Subject: [smarty] Prefilters & Assign Why can't I make a $smarty_obj->assign(....); in a prefilter? /Andreas --- You are currently subscribed to smarty as: martin@inleadmedia.com To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/

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