[htmltmpl] TMPL_IF and TMPL_ELSE - how do I use this?

2004-02-17 Thread LDT
I've read the documentation sections on TMPL_IF and TMPL_ELSE.  The part where I'm getting stuck is figuring out how to set up that "BOOL" value.  I know if "BOOL" is true, then the section in TMPL_IF is run; if it's false, the section in TMPL_ELSE is run.  This sounds like what I want to do (I thi

[htmltmpl] Nested loop puzzle - variable columns and rows

2004-02-11 Thread LDT
I'm a little stumped on how best to approach a particular problem.  I have a report I'm building that will span an uncertain number of columns and uncertain number of rows.  Below is a sample of what the report might look like:   Account   Descr   Jan   Feb   Jun   Aug   Nov Total 51112 Fr

Re: [htmltmpl] TMPL_VAR inside a TMPL_VAR

2004-01-13 Thread LDT
Thanks for the reply, Ron.  I'll try to answer your questions.  I ended up just using a TMPL_INCLUDE to handle it since it was taking me so long to figure it out (and the reports are due 2-1-04, and this is just the first one).  However, I really appreciate your taking the time to explain to me why

Re: [htmltmpl] TMPL_VAR inside a TMPL_VAR

2004-01-09 Thread LDT
EMAIL PROTECTED]);Ln598:  my $big_tmpl = HTML::Template->new( scalarref => \$cell_fmt );Ln599:  $big_tmpl->param( cell_fmt  => $tmpl_main->output() );Ln600:  print $tmpl_main->output(); And a shortened snipped version of my .tmpl file:       bgcolor=>            Timm Murray <

Re: [htmltmpl] TMPL_VAR inside a TMPL_VAR

2004-01-09 Thread LDT
and I want to keep my code as maintainable (and readable) as possible.  Or, am I being too picky? Timm Murray <[EMAIL PROTECTED]> wrote: scalarref takes just that: a reference to a scalar. So you almost got it:$tmpl_main = HTML::Template->new( scalarref => \$cell_fmt );At 06:27 AM 1/

Re: [htmltmpl] TMPL_VAR inside a TMPL_VAR

2004-01-09 Thread LDT
ng a HERE doc, and I get pretty much the same error each time.  So, obviously, I'm using it incorrectly but I don't understand why.  Any ideas?  If you're willing, would you give me a dumbed down version?  ;-)   Thanks!   Lori ThompsonTimm Murray <[EMAIL PROTECTED]> wrote:

[htmltmpl] TMPL_VAR inside a TMPL_VAR

2004-01-08 Thread LDT
I'm running into an error when trying to pass a TMPL_VAR inside a TMPL_VAR and have it be evaluated.  I've set global_vars = 1, so I was thinking that would help.  I've included the pieces of my program, template and output.  As you can see, most of the TMP_VARs are evaluated/passed, but the intern

[htmltmpl] Can HTML::Template do subtotals?

2003-12-31 Thread LDT
This is my first project using Perl and HTML::Template, and my first posting to this users list (after searching http://www.bluedot.net/mail/archive/ for things like "totals" and "total row" and "subtotal").     I'm trying to figure out how to insert subtotals periodically and to calculate differen