[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] Link to 2nd results page?
Quoting Rat (rat@hackunix.org):
> Ok.. I need links on my index page that will allow the user to go directly to
> each page of results for a specific kind of item.. in this case, grandfather
> clocks. If you check out my index page (http://gfcplus.com/~eaganh/cgi-
> bin/cart.cgi) you will see that on the left there is an image with an image map
> that says gallery 1 2 3 4. Well I need those buttons to generate pages that
> have 25 products a piece and I need them to display the proper products (i.e.
> link #1 will produce items 1-25, link 2 will produce items 26-50, ect..) They
> will use the template page grandfather_clock_gallery_1.html. So I built this
> search
>
> [area href=scan
> search=|
>
> fi=products
> st=db
> sp=grandfather_clock_gallery_1
>
> co=1
>
> sf=category
> se=grandfather
> op=eq
> nu=0
>
> ml=25
> tf=price
> to=x
> tf=sku
> to=x
> |
> ]
>
> and that will bring up the first gallery (1-25) but is there something that I
> can change in that search to make the page display 26-50,51-75,ect...
You have to provide the template yourself using the [more-list]. The
pages by default display "1", "2", etc.
This would not be too difficult to do with something like:
[tmp more_string]
[more-list]
[page-anchor]~~$PAGE$~~[/page-anchor]
[more]
[/more-list]
[/tmp]
[calc]
my $ml = 10;
my $more_num_sub = sub {
my $page = shift;
$page_max = $ml * $page;
$page_min = $page_max - $ml + 1;
return $page_min . '-' . $page_max;
};
$Scratch->{more_string} =~ s/\~\~(\d+)\~\~/$more_num_sub->($1)/ge;
return $Scratch->{more_string};
[/calc]
We might consider offering this as an intrinsic anchor type with
a $MINPAGE$ and $MAXPAGE$ substitution for these numbers. I will put
that on my minor todo list.
--
Mike Heins
Perusion -- Expert Interchange Consulting
phone +1.513.523.7621 <mike@perusion.com>
How far can you open your mind before your brains fall out?