logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • Andy
    • Posted on Thu 25 Apr 2002

    Hi,

    I have created a grouping for my search results, using the following code:

    view := @ViewTitle; REM "NOTE: start param must be before count param in the original URL"; pageString := "<a href=\"" + view + "?SearchView&Query=" + Query + "&start=";

    REM "We are limited to 250 docs by domino!!"; hitNum := @If(TotalHits > 250;249;TotalHits-1);

    Values := "0":"1":"2":"3":"4":"5":"6":"7":"8":"9"; Range := @Integer(TotalHits/Count); Scope := @SubSet( @TextToNumber(Values*+Values)*Count; Range ); Remainder := @Modulo(TotalHits;Count); LastEntry := @Subset(Scope;-1)+Count; Trailing := @If(Remainder>0; " | " +@Text(LastEntry)+ "-" +@Text(LastEntry+Remainder); "");

    repl := pageString + @Text(Scope+1) + "&count=10\">" + @Text(Scope+1)+ "-" +@Text(Scope+Count) + "</a>"; with := "<b>" + @Text(1+@Text(Scope+Count)) + "</b>";

    @If(TotalHits > 10;"<p>"+ @Implode( pageString + @Text(Scope+1) + "&count=10\">" + @Text(Scope+1)+ "-" +@Text(Scope+Count) + "</a>"; " | " ) + Trailing; "&nbsp")

    I am trying to get the results page to display 1-10 | 11-20 | 21-30 etc....

    My problem is that with this code, I get 1-10 and 11-20 generated fine, but 20-24 displays but not as a link. So it would appear that it is finding the numbers but my code is not able to translate this into a link to reload the search query.

    Any ideas ??

    Thanks in advance.

    Andy

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: