Fixed startfrom in template links in header
authortonnesen <tonnesen>
Fri, 10 May 2002 21:26:24 +0000 (21:26 +0000)
committertonnesen <tonnesen>
Fri, 10 May 2002 21:26:24 +0000 (21:26 +0000)
html-template/cmsdsearchresults.tmpl
html-template/search.pl
html-template/searchheader.tmpl
html-template/searchresults.tmpl

index 3ffb0f5..f857d0b 100644 (file)
@@ -12,7 +12,7 @@
   <td> <TMPL_VAR NAME=notes> </td>
   </tr>
 </TMPL_LOOP>
-<tr><td colspan=3><a href=search.pl?template=<TMPL_VAR NAME="template">&startfrom=<TMPL_VAR NAME="startfrom">>Next Records</a></td></tr>
+<tr><td colspan=3><a href=search.pl?template=<TMPL_VAR NAME="template">&startfrom=<TMPL_VAR NAME="nextstartfrom">>Next Records</a></td></tr>
 </table>
 <hr>
 </body>
index 0fb0672..09e2e19 100755 (executable)
@@ -16,7 +16,6 @@ my $startfrom=$query->param('startfrom');
 my $dbh=&C4Connect;  
 
 
-print STDERR "SF: $startfrom\n";
 my $template = HTML::Template->new(filename => $templatename, die_on_bad_params => 0);
 
 my @results;
@@ -28,8 +27,9 @@ while (my $data=$sth->fetchrow_hashref){
 
 
 
-$startfrom+=20;
 $template->param(startfrom => $startfrom);
+$startfrom+=20;
+$template->param(nextstartfrom => $startfrom);
 $template->param(template => $templatename);
 $template->param(SEARCH_RESULTS => \@results);
 
index c2dc399..bb8fc2f 100644 (file)
@@ -1,2 +1,2 @@
-<a href=search.pl?template=cmsdsearchresults.tmpl>Template #1</a> | <a href=search.pl?template=searchresults.tmpl>Template #2</a>
+<a href=search.pl?template=cmsdsearchresults.tmpl&startfrom=<TMPL_VAR NAME="startfrom">>Template #1</a> | <a href=search.pl?template=searchresults.tmpl&startfrom=<TMPL_VAR NAME="startfrom">>Template #2</a>
 <hr>
index 3db4a47..fa0852e 100644 (file)
@@ -12,7 +12,7 @@
   <td> <TMPL_VAR NAME=biblionumber> </td>
   </tr>
 </TMPL_LOOP>
-<tr><td colspan=3><a href=search.pl?template=<TMPL_VAR NAME="template">&startfrom=<TMPL_VAR NAME="startfrom">>Next Records</a></td></tr>
+<tr><td colspan=3><a href=search.pl?template=<TMPL_VAR NAME="template">&startfrom=<TMPL_VAR NAME="nextstartfrom">>Next Records</a></td></tr>
 </table>
 <hr>
 </body>