Re: [SMARTY-GENERAL] What are the postfilters for?
| From: | Gabor Hojtsy | Date: | Sun, 07 Apr 2002 22:37:50 +0000 |
| Subject: | Re: [SMARTY-GENERAL] What are the postfilters for? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-3550@lists.php.net to get a copy of this message | ||
As I mentioned before, I have no problem with the current
postfilter functionality, I had the problem that I assumed,
that it works on the HTML output. It was reasonable...
I used the technique presented bellow by Andrei before, and
posted the same solution these days...
Goba
> I guess the real issue is the assumption of the postfilter behavior.
> Maybe we just make some clarifications in the manual then?
> >> The only downside to that is that it is not automated. If there is
> >> something you always want applied to all template output, you have to
> >> do in in your application each time. Also when you apply your own
> >> changes after a fetch, the same performance issues apply (fetch uses
> >> output buffering)
> >
> >
> > What's the problem?
> >
> > class My_Smarty extends Smarty {
> > ...
> > function display($template, $cache_id = null, $compiled_id =
> > null)
> > {
> > $content = $this->fetch($template, $cache_id,
> > $compile_id);
> > // apply processing to $content;
> > echo $content;
> > }
> > }
> >
> > $smarty = new My_Smarty();
> > ...
> > $smarty->display('my_template.tpl');
> >
> > -Andrei
> >
>
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>