[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Re: HT filters


Ron Savage wrote:
Hi Robert

If I create a filter for HT do I have to pass it in a certain way?

Read all about it:
http://www.perl.com/pub/a/2006/11/30/html-template-filters.html


I did, but that doesn't answer the question because that is a "straight" usage of HT filters where I need to pass things through the CA way (because apparently the HT way doesn't work when used in conjunction with CA).

In HT only you call it directly:

    my $tpl = HTML::Template->new( filename => 'home.tpl',
                                   filter => \&doc_filter );

In CA you call that through the load_tmpl but I tried this:

    my $tpl = $self->load_tmpl( 'home.tpl', filter => \&doc_filter );

and that does not work.

Robert


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.