Ultimater
10-10-2005, 12:25 AM
http://search.cpan.org/~samtregar/HTML-Template-2.7/Template.pm#TMPL_LOOP
cpan gives the following code:
$template->param(LOOP => [
{ name => 'Bobby',
nicknames => [
{ name => 'the big bad wolf' },
{ name => 'He-Man' },
],
},
],
);
Can I get an example program that uses two TMPL_LOOP tags nested within each other?
FYI, My template file looks like so but I can't seem to find the syntax to feed the template the information it needs from my arrays:
<TMPL_LOOP NAME="THEATER_NAME_LOOP">
THEATER <TMPL_VAR NAME="THEATER_COUNT">: <TMPL_VAR NAME="THEATER_NAME"> <br>
<TMPL_LOOP NAME="MOVIE_NAME_LOOP">
+MOVIE <TMPL_VAR NAME="MOVIE_COUNT">: <TMPL_VAR NAME="MOVIE_NAME"><br>
</TMPL_LOOP>
</TMPL_LOOP>
I can careless what is contained in the arrays, I just want to see a working example. Thanks in advance.
cpan gives the following code:
$template->param(LOOP => [
{ name => 'Bobby',
nicknames => [
{ name => 'the big bad wolf' },
{ name => 'He-Man' },
],
},
],
);
Can I get an example program that uses two TMPL_LOOP tags nested within each other?
FYI, My template file looks like so but I can't seem to find the syntax to feed the template the information it needs from my arrays:
<TMPL_LOOP NAME="THEATER_NAME_LOOP">
THEATER <TMPL_VAR NAME="THEATER_COUNT">: <TMPL_VAR NAME="THEATER_NAME"> <br>
<TMPL_LOOP NAME="MOVIE_NAME_LOOP">
+MOVIE <TMPL_VAR NAME="MOVIE_COUNT">: <TMPL_VAR NAME="MOVIE_NAME"><br>
</TMPL_LOOP>
</TMPL_LOOP>
I can careless what is contained in the arrays, I just want to see a working example. Thanks in advance.