Hi,
I've been using HTML::Template for a while, but am having a weird
problem when
using it in a CGI::Application app. Basically, when I call
$template->output, the application requests the page from the server
twice,
instead of once if I just create and return my own HMTL.
Not sure what is happ
Attached is H::T::Filters module which implements some common filters.
One of them is the TMPL_SET filter which can be used to do what you
are asking for.
Thanks, that is a useful module, but I cannot make it work on included
files.
(The included file can not see what you TMPL_SET'ed is the "ou
Hello,
is there a way to set template parameters from within the template?
I would like to do this because I have pages that include a common
header (who doesn't ?)
and that header makes a page title.
At the moment, I have to set "page_title" in my application code (well,
not really, it is fac
I have a problem with using UFT8-encoded templates.
The problem seems to be caused by the templates not being open'd()
with
the :utf8 flag.
Does it work if you open() them yourself and pass the filehandle to
new() instead of the filename?
I suppose that would work, but I cannot do that for the inc
Hi,
I have a problem with using UFT8-encoded templates.
The problem seems to be caused by the templates not being open'd() with
the :utf8 flag.
I can use these templates with HTML::Template just fine, unless I put
in template parameters that are Unicode strings.
As long as there are no paramete
Hi,
I have a mod_perl/CGI::Application program that I've written that
populates
a HTML::Template with a list of files that are on the server.
I'd like to cache that list, based on the URL, so that it doesn't have
to do
a readdir(), grep() and also a TreeBuilder to get the TITLE everytime
som
HTML::Template source code:
# what a hack! This should really be optimized out for
case_sensitive.
Well, I did just that.
Please find attached the patch for HTML::Template 2.6.
Patch the files Template.pm and test.pl (I added two new tests).
Regards,
Thilo Planz
test.pl.patch
Hi Mark,
Glad you like it.
> Would it work for something like this:
>
> package Object;
>
> sub new {
> my ($class, $id) = @_;
> my $self = {};
> bless $self, $class;
> $self->{name} = "name of object";
> $self->{id} = $id;
> return $self;
> }
>
> package main
'b' =>
{'c'=>3, 'd'=>4}
}
);
to set
Anyone else think this is useful?
Cheers,
Thilo Planz
===
Here is the patch:
# if the value is a hashref,
# construct parameters