Sorry, I don't follow you. My global is thus:
sub {
my $table = $DB->table('Articles');
my $tags = GT::Template->tags;
my $pages = $tags->{Related};
return { page_loop => [ map +{ page => $_, title => $table->select('Title')->fetchrow}, split /,/, $pages ] };
}
my template is thus - but I expected it to be wrong!
<%get_related%> <!-- Init the loop tag -->
<%loop page_loop%>
<a href="db.cgi?do=search_results&keyword=*&db=<%db%>&RecordID=<%page%>&details=1"><%Title%></a><br>
<%endloop%>
But this <%Title%> in the URL gives me the referring page's Title and not the Titles of the records. Trying with <%title%> gives EACH time the Title of a record whose number is NOT in the array. I've missed something...
Thanks
sub {
my $table = $DB->table('Articles');
my $tags = GT::Template->tags;
my $pages = $tags->{Related};
return { page_loop => [ map +{ page => $_, title => $table->select('Title')->fetchrow}, split /,/, $pages ] };
}
my template is thus - but I expected it to be wrong!
<%get_related%> <!-- Init the loop tag -->
<%loop page_loop%>
<a href="db.cgi?do=search_results&keyword=*&db=<%db%>&RecordID=<%page%>&details=1"><%Title%></a><br>
<%endloop%>
But this <%Title%> in the URL gives me the referring page's Title and not the Titles of the records. Trying with <%title%> gives EACH time the Title of a record whose number is NOT in the array. I've missed something...
Thanks