Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

How to put the number of pages in the search results

Quote Reply
How to put the number of pages in the search results
Is possible to display "Page 1 of 10", in the search results!
Quote Reply
Re: How to put the number of pages in the search results In reply to
Hi,

Sorry about the late reply! You should see Pages: 1 2 3 4 5 6 ... in your search box? For instance, go to:

http://gossamer-threads.com/...search.cgi?query=car

and you'll see the next toolbar.

This is available in the tempaltes using <%next%>.

Cheers,

Alex
Quote Reply
Re: How to put the number of pages in the search results In reply to
Wouldn't you put the variables
Code:
page => $page,
pageof => $pageof,
into site_html_templates.pl, then in your search script before
Code:
}
# Print out the HTML results. &site_html_search_results;
put $pageof = int($nh);
$page = int($link_hits/$maxhits + 1); . Then you would call this on your template or whatever you use <%if next%>
Page <%pageof%> of <%page%>
<%endif%>. Works for me. But i use links 2.0 so it may not work for sql.
I also have the code to display links 1-10 of 50. And then it would go up to 11-20 or whatever your maxhits are. If you want.

------------------
------------------------------------------
Lavon Russell
LookHard! Search
www.lh.yi.org
webmaster@lh.yi.org


[This message has been edited by Bmxer (edited August 05, 1999).]