The 'date' entry in the LISTS loop works, but the ENTRY loop doesn't do anything. In fact if I leave the ENTRY loop in all I get out of HTML::Template is a blank screen.
Any help would be great!
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My output is that I see the first DATES loope, so I see the 'date' variable being displayed. But it doesn't seem to process the 'DATES-DATA' so it must not be pushed right.
I'm using Perl 5.6 on Win32 with Template::HTML 1.8. Does this version of Teamplate::HTML not allow nested loops?
Any help please.
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First, you didn't close one <TMPL_LOOP>.
Second, are you sure that $dates_data is an arrayref? How did you create it? Try to push to plain @array. But don't forget to put 'my' when needed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
push @shows,{'date' => $lastdate, 'ENTRY' => ['bands' => [@bands], 'songs' => [@songs], 'albums' => [@albums], 'labels' => [@labels], 'requests' => [@requests], 'specials' => [@specials]]};
With the following Template:
<TMPL_INCLUDE NAME="E:/mxs/new/www/backend/main.top.temp">
<TMPL_LOOP NAME="LISTS">
<P><TMPL_VAR NAME="date">
<TMPL_LOOP NAME="ENTRY">
<BR><TMPL_VAR NAME="bands"> / <TMPL_VAR NAME="songs"> / <TMPL_VAR NAME="albums"> / <TMPL_VAR NAME="labels">
</TMPL_LOOP>
</TMPL_LOOP>
<TMPL_INCLUDE NAME="E:/mxs/new/www/backend/main.bottom.temp">
The 'date' entry in the LISTS loop works, but the ENTRY loop doesn't do anything. In fact if I leave the ENTRY loop in all I get out of HTML::Template is a blank screen.
Any help would be great!
Thanks.
I've changed my perl code so it looks a little cleaner:
This is how I push $dates_data:
push(@{$dates_data},{ band => $artist ,song => $song, album=> $album, label=> $label, request=> $request, special=>$special });
This is how I push @shows:
push(@shows, {date => $lastdate, DATES-DATA => $dates_data });
Here's the template:
<TMPL_LOOP NAME="DATES">
<P><TMPL_VAR NAME="date">
<TMPL_LOOP NAME="DATES-DATA">
<BR><TMPL_VAR NAME="band"> / <TMPL_VAR NAME="song"> / <TMPL_VAR NAME="album"> / TMPL_VAR NAME="label">
</TMPL_LOOP>
My output is that I see the first DATES loope, so I see the 'date' variable being displayed. But it doesn't seem to process the 'DATES-DATA' so it must not be pushed right.
I'm using Perl 5.6 on Win32 with Template::HTML 1.8. Does this version of Teamplate::HTML not allow nested loops?
Any help please.
Thanks.
Hello,
First, you didn't close one <TMPL_LOOP>.
Second, are you sure that $dates_data is an arrayref? How did you create it? Try to push to plain @array. But don't forget to put 'my' when needed.