Dan Horne wrote:
On Behalf Of Robert Hicks
Sent: Thursday, 12 October 2006 3:00 a.m.
To: cgiapp@lists.erlbaum.net
Subject: [cgiapp] Re: HTML::Template -> TT

Dan Horne wrote:
All you'd need to do is replace the HT parameters in your templates with
TT
syntax. You should also look at C::A::Plugin::AnyTemplate if you don't
want
to change the invocation of your templates by your Perl code

I can probably get most of that. However I have small questions:

<tmpl_var err_task_or_add_task>

Would that simply be [% err_task_or_add_task %] or do I need an IF in
there like [% IF err_task_or_add_task %][% END %]?


Just [% err_task_or_add_task %]



One more thing and I am good to go...if I can bend you patience once more please.

Currently with HT I do this:

my $template = $self->load_tmpl('reports.tmpl.html');

$template->param(
    title => 'Trakker :: Reports Page',
    data => $data,   
);

$template->param($errs) if $errs;


I tried converting that to this:

my %params = (
    title => 'Trakker :: Reports',
    data => $data,
);

# I imagine this is totally wrong?!
%params = (
    errs => $errs,
) if $errs;

return $self->tt_process( 'template.tt', \%params );

When using HT, when it hits errors it brings back the page with the markup showing what needs to have values and the data is still in the drop downs. With the change to TT, it brings back the page but it doesn't show anything and the data in the drop downs is gone.

Robert


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to