Gossamer Forum
Home : Products : Links 2.0 : Customization :

Search results > Problem

Quote Reply
Search results > Problem
Hi,

I would like Links 2, when an user searches the database, to display 5 results per page.

So I changed search.cgi like this :

local $maxhits = 5;
if ($in{'mh'} && (($in{'mh'} == 5) || ($in{'mh'} == 10) || ($in{'mh'} == 15) || ($in{'mh'} = 100))) {

No problem, search.cgi displays 5 results per page.

The problem is their "number". Search.cgi displays :

On page 1

Your search returned xx results :

1. Link 1

2. Link 2

3. Link 3

4. Link 4

5. Link 5

The problem is on page 2 and next span pages, because search.cgi displays :

1. Links 6

2. Links 7

3. Links 8

etc.

Like you see, there's a problem because search.cgi, on result page 2 and next, begins again to count the results from number "1.".

On page 2, it would be much better to begin the count from 5.

Search.cgi would therefore display on page 2 :

6. Link 6

7. Link 7

8. Link 8

etc...

How can I do that ?

Thanks for your answer !

Regards,

Gautier.