[ic] display only 25 instead of 50 products on result page

David Berry interchange-users@interchange.redhat.com
Tue Nov 20 15:40:01 2001


If you're trying to limit the number displayed without using the 
"search_box_small" component, try:



in the file catalog_before.cfg file
( found in '/usr/lib/interchange' on my setup)

this is a snippet from the alteration: (just scroll down to the relevant bit)

the 3 lines referring to "ml" are the only ones that need to be added,
here MatchLimit is being set to 6.
...

Variable  MV_DEFAULT_SEARCH_TABLE products

Sub <<EOR
sub bar_link {
        my $base = shift || 'cat';
        my $extra;
        $base =~ s/(\W.*)//s
                and $extra = $1;
        my $ref = shift;
        my $code = $ref->[0];

        my $record =  tag_data($base, 'n/a', $code, { hash => 1 });
        return $ref->[0] unless $record;

        my $url;
        my $anchor;
        my $highlight;
        my $first;
        my $ml = 6;

        LINK: {
                push @out, "ml=$ml";
                if($record->{link_type} eq 'external') {
			$first = $record->{url};
			$first =~ s/\s+$//;
			$first =~ s/^\s+//;
			$url = $first;
		}
		elsif	($record->{link_type} eq 'internal') {
			my ($page, $form) = split /\s+/, $record->{url}, 2;
			my $current = $Tag->var('MV_PAGE', 1);
            $highlight = 1 if   $page eq $current
                                    or
                                $page eq $CGI->{ui_explode};
			$url = $Tag->area( { href => $page, form => $form });
		}
		elsif	($record->{link_type} eq 'simple') {
		            push @out, "ml=$ml";

...

save and restart IC.

This works for me ...

Dave