Quoting Ton:
Hi All,
I am using the following code on a page.
Basically what I am trying to accomplish is displaying the search
results found in a Perl block using the [search-region] mechanism
including the more-list feature.
Unfortunately, clicking the more list links will generate errors like:
'Object saved wrong....'
Would I need to save the search results manually in the Perl block?
[perl]
my $label = 'mysearch';
my $ary = [
[ 'return-A1', 'return-A2', ],
[ 'return-B1', 'return-B2', ],
[ 'return-C1', 'return-C2', ],
[ 'return-D1', 'return-D2', ],
];
my $n = scalar @$ary;
$Search->{$label} = {
matches => $n,
mv_results => $ary,
mv_matchlimit => 2,
mv_field_names => [ 'field1', 'field2', ],
};
return;
[/perl]
[search-region label=mysearch]
[search-list]
[item-code] - [item-param field2]<br>
[/search-list]
[more-list]
[more]
[/more-list]
[/search-region]
Tried another angle: used object option of search-region tag.
Result: Still no working more-list (shows only the first 3 results).
In this example a file is created in the tmp directory
tmp/s/session_id.cache_key
I am wondering why the more-list does not work in the example
below. Has anyone any idea of how we can get this puppy to work?
Many thanks in advance !
##### Code start #####
[if !scratch my_search_results]
[perl]
my $out = [
[ 'PSC001' ],
[ 'PSC002' ],
[ 'PSC003' ],
[ 'PSC004' ],
[ 'PSC005' ],
[ 'PSC006' ],
[ 'PSC007' ],
[ 'PSC008' ],
[ 'PSC009' ],
[ 'PSC010' ],
[ 'PSC011' ],
[ 'PSC012' ],
[ 'PSC013' ],
[ 'PSC014' ],
];
$Scratch->{my_search_results} = {
mv_results => $out,
};
return;
[/perl]
[/if]
<xmp>
More matches stored as: [calc]$Tag->uneval(undef,
$Scratch->{my_search_results});[/calc]
Session: [data session id]
</xmp>
[if scratch my_search_results]
[search-region object=`$Scratch->{my_search_results}` ml=3]
<xmp>
[search-list][item-code]
[/search-list]
</xmp>
[more-list][more][/more-list]
[/search-region]
[else]
No object !
[/else]
[/if]
##### Code end #####
Best regards,
Ton
--
Alamerce Nederland --- Cornerstone of eBusiness
Phone +31-40-2374381 suppressed http://www.alamerce.nl
eCommerce Solutions -- Consulting -- Website & Interchange Hosting
_______________________________________________ interchange-users mailing list suppressed http://www.icdevgroup.org/mailman/listinfo/interchange-users
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.