What are the postfilters for?

From: Date: Sat, 06 Apr 2002 12:58:46 +0000
Subject: What are the postfilters for?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3527@lists.php.net to get a copy of this message
Can you show me some practical use of postfilters? Modifying compiled templates looks hard to me - you can easily corrupt the inner PHP code doing anything more advanced than adding a footer or a header. For instance - when I remove template indenting (= trim all the lines), should I do this through a prefilter, or a postfilter? Even then, there could be some whitespace in template variables, which cannot be removed by a postfilter. So, maybe Smarty should have something like post-post-filter - a filter which works on the final, generated page, with all the variables already substituted. It can be useful e.g. for converting documents to various codepages - e.g. "utf-8" for WML and "iso-8859-1" for WWW (having all the templates in "win-1250" standard). And it's far easier to operate on pure HTML document - you don't have do pay attention to protect Smarty/PHP tags. --- Michal Prinke

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