Extending HTML::TemplateIncludes via HTTPHTML::Template lets you do includes with the <TMPL_INCLUDE "filename.tmpl"> syntax. But what if that file isn't on your local machine ? Just add custom filter for your templates and implement a new tag without touching the inner workings of HTML::Template.Just do my $tmpl = HTML::Template->new(filename => "filename.tmpl", filter => \&TemplateTools::http_include);and replace your <TMPL_INCLUDE "filename.tmpl"> with <TMPL_HTTP_INCLUDE "http://server/filename.tmpl">. The nice thing is that the new tag is completely independent of the Template module and should also work with replacement modules for HTML::Template such as HTML::Template::Compiled. Download: TemplateTools.pm.
| ||
|
Last updated: 08. Aug 2012 Page maintained by Jan Willamowius Imprint/Impressum · Privacy/Datenschutz | Deutsch: Home | Badminton | ISBN-Suche | Musik-Suche | Rezepte | Jan Willamowius |