What are the postfilters for? [not just a vote]
| From: | Michal Prinke | Date: | Sun, 07 Apr 2002 20:08:14 +0000 |
| Subject: | What are the postfilters for? [not just a vote] | ||
| References: | 1 2 3 4 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3548@lists.php.net to get a copy of this message | ||
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.
--- Michal