Re: [SMARTY-GENERAL] What are the postfilters for? [not just a vote]

From: Date: Mon, 08 Apr 2002 14:46:02 +0000
Subject: Re: [SMARTY-GENERAL] What are the postfilters for? [not just a vote]
References: 1 2 3 4 5  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3558@lists.php.net to get a copy of this message
On Sun, 07 Apr 2002, Michal Prinke wrote: > Since now, nobody has proposed a practical use for the postfilters... > I do understand they are effective because of executing only once. So what? > Applying modifications to PHP code is rather hard and can be dangerous... > > Grabbing the final HTML to work with is quite easy, I agree. But I think > it is a common practice for many template designers, so it should be embedded > in Smarty. We've seen two examples of such generated-document-processing: > converting between various codepages and applying custom TransSID function. > > > > Second thing: > > > $content = $this->fetch($template, $cache_id, $compile_id); > > // apply processing to $content; > > echo $content; > > The problem with the code above is that it turns off the debugging console > (because of using Smarty->fetch() instead of Smarty->display()). > The user must be allowed to mix the debugging functionality with > generated-document-processing; personally, I just love SMARTY_DEBUG > and it helps me a lot. So, do this: ob_start(); $this->display($template, $cache_id, $compile_id); $content = ob_get_content(); ob_end_clean(); -Andrei * The future has arrived, it's just not evenly distributed. -W. Gibson *

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