Re: [htmltmpl] nested loops

2003-09-29 Thread Philip S Tellis
On Mon, 29 Sep 2003, Kenneth Gonsalves wrote: > my %rowdata; > $rowdata{cols} = [EMAIL PROTECTED]; ^^ you assign a reference to @cls > push (@rows,\%rowdata); > @cls = ();

[htmltmpl] nested loops

2003-09-29 Thread Kenneth Gonsalves
hi i have some data that i want to output in three columns, so i'm trying to build a nested loop. This is the perl code: #!/usr/bin/perl -w use CGI; use HTML::Template; use strict; use DBI; my $q = new CGI(); my @rows = (); my @cls = (); my $q1 = "select id,blurb,thumb from pictures"; my $st1 =

Re: [htmltmpl] Nested loops and __first__

2003-09-15 Thread Karen J. Cravens
On Mon, 15 Sep 2003, Karen J. Cravens wrote: KJC>As is usual, I discovered this only *after* posting the question to the KJC>list... And after that, I realized things still aren't working quite right. It's not the loop variables, though. It's the nested loop. I've got globals turned on. If I'

Re: [htmltmpl] Nested loops and __first__

2003-09-15 Thread Karen J. Cravens
On Sun, 14 Sep 2003, Sam Tregar wrote: ST>Have you tried turning off global_vars? Does that solve the problem ST>with __first__? What version of HTML::Template are you using? Turned out it wasn't the version of HTML::Template, exactly, but the version of Perl. I hadn't tried turning off global

RE: [htmltmpl] Nested loops and __first__

2003-09-15 Thread Ben Ausden
> > I've got a __first__ that isn't acting the way I expect it... > it's always false. I'm wondering if that's happening because > I've got global_vars on and it's the inner loop of a two-loop nest. You are setting loop_context_vars, aren't you? Ben ---

Re: [htmltmpl] Nested loops and __first__

2003-09-14 Thread Sam Tregar
On Sat, 13 Sep 2003, Karen J. Cravens wrote: > I've got a __first__ that isn't acting the way I expect it... it's always > false. I'm wondering if that's happening because I've got global_vars on > and it's the inner loop of a two-loop nest. > > I'm betting it is, but I'm hoping someone will tel

[htmltmpl] Nested loops and __first__

2003-09-13 Thread Karen J. Cravens
I've got a __first__ that isn't acting the way I expect it... it's always false. I'm wondering if that's happening because I've got global_vars on and it's the inner loop of a two-loop nest. I'm betting it is, but I'm hoping someone will tell me I'm wrong, because I'd really like to leave global_

[htmltmpl] nested loops

2003-06-09 Thread Andrew Brosnan
In the docs, regarding nested loops it says: $template->param(LOOP => [{ name => 'Bobby', nicknames => [{ name => 'the big bad wolf' }, { name => 'He-Man' }, ], },

RE: [htmltmpl] Nested Loops

2002-06-26 Thread Chris Davies
On Mon, Jun 24, 2002 at 08:35:25AM -0700, Roy Rubin wrote: >I am looking to >use the refernces that are already part of the DBI, instead of hard coding >the variables (as in $OfficeID, etc.) I hope this makes sense. On Monday, June 24, 2002 4:47 PM:Roger Burton West [mailto:[EMAIL PROTECTED]] rep

[htmltmpl] Nested Loops

2002-06-24 Thread Roy Rubin
Hello, Can someone provide an example of nested loops. I have it working, but I am using *bad* code because I have had problems with referencing. Thanks. Roy [EMAIL PROTECTED] > I sent the post to both lists - not sure which one is currently live. ---