First of all, you have to use the 'link_results_loop' and 'category_results_loop' tags as pugdog said. No need to edit your code, though....
Use this global (calculate_search_offset):
my $nh = shift;
my $mh = shift;
return {search_offset => 0 } unless $nh =~ /^\d+$/;
$mh ||= $CFG->{search_maxhits};
return { search_offset => ($nh - 1) * $mh };
}
Do something like the following in the search_results.html template:
<%calculate_search_offset($nh,$mh)%>
<%loop link_results_loop%>
<%include link.html%>
<%endloop%>
Finally, in link.html, put the following code wherever you want the number to appear:
<%row_num + $search_offset%>.
<%endif%>
I just added this on my page, have a look at
http://www.iyengar-yoga.com/...earch.cgi?query=yoga
Ivan
-----
Iyengar Yoga Resources / GT Plugins
Use this global (calculate_search_offset):
Code:
sub { my $nh = shift;
my $mh = shift;
return {search_offset => 0 } unless $nh =~ /^\d+$/;
$mh ||= $CFG->{search_maxhits};
return { search_offset => ($nh - 1) * $mh };
}
Do something like the following in the search_results.html template:
Code:
<%set search_page = 1%> <%calculate_search_offset($nh,$mh)%>
<%loop link_results_loop%>
<%include link.html%>
<%endloop%>
Finally, in link.html, put the following code wherever you want the number to appear:
Code:
<%if search_page%> <%row_num + $search_offset%>.
<%endif%>
I just added this on my page, have a look at
http://www.iyengar-yoga.com/...earch.cgi?query=yoga
Ivan
-----
Iyengar Yoga Resources / GT Plugins