Re: [socrates] Search only this (parent) category but also show links/results from all subcategories
Hi,
I'm not sure why you are not seeing the results you want. That sounds like how it works as default:
my (@children, %seen);
foreach my $id (@cat_ids) {
next if ($id !~ /^\d+$/);
my $child = $cat_db->children($id) or next;
push @children, @$child, $id;
}
This bit:
Will get all the sub-categories, and then add those ID's into the list of ID's to search for. Are you sure its not working right?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I'm not sure why you are not seeing the results you want. That sounds like how it works as default:
Code:
my @cat_ids = $IN->param('catid') or return $results; my (@children, %seen);
foreach my $id (@cat_ids) {
next if ($id !~ /^\d+$/);
my $child = $cat_db->children($id) or next;
push @children, @$child, $id;
}
This bit:
Code:
my $child = $cat_db->children($id) or next;Will get all the sub-categories, and then add those ID's into the list of ID's to search for. Are you sure its not working right?
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!