Re: [SMARTY-DEV] Bug!? Outputfilters don't work like in previous versions (post-2.5.0-cvs)
| From: | Wom.bat | Date: | Sat, 26 Apr 2003 21:33:55 +0000 |
| Subject: | Re: [SMARTY-DEV] Bug!? Outputfilters don't work like in previous versions (post-2.5.0-cvs) | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1273@lists.php.net to get a copy of this message | ||
> hmm. that's quite how inserts work, too.
I once used them, it was MORE than slow (a few hundres milliseconds)
> the outputfilter is run *before* the file is written to the cache. so
> the outputfilter's work is cached too. but this way is not a recent
> change. i'm pretty sure all 2.4.x work this way, too.
hm... I just looked it up... you're right... I must have dreamt this ;)
> so you start with caching=false and caching is also false after your
> "$smarty->display('index.tpl');" returned ?
yes... I'm having a method safeDisplay() in my class (MySmarty extends
Smarty :)) which assigns $_REQUEST and $_SESSION to the template, displays
the template and then sets caching to false and executes a clear_assign() to
all assigns done to the template (for that, I have another method,
safeAssign()... I store the variable names in an array so that I can
unassign them later)
> anyway: with caching=true the outputfilter never worked as you expected.
yes... man... I'm getting old ;)
I'm just wondering if I might do a $output = $smarty->fetch('index.tpl') and
then replacing the whole thing... are templates "really" nested, i.e. does
this approach work if I include scripts in index.tpl which do
$smarty->display()? ;) It should, I suppose... well... I'm gonna try it out
;)
Greetings,
David