Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Essam] Help in showing links in higher catogories: Edit Log

Here is the list of edits for this post
Re: [Essam] Help in showing links in higher catogories
Hi, Please try this code, I don't think the error is related to any missing or wrongly named columns, it is just a few minor code issues...

Try this (untested):

Code:
my $tags = shift;
my $cat_id = $tags->{CategoryID};

return '' unless ($tags->{ShowSubCategoryLinks});

my $subcats = $DB->table('Category')->select ('Name', { FatherID => $cat_id })->fetchall_hashref;
my $output = '';

foreach my $subcat (@$subcats) {
$output .= "$subcat->{Name}<br>";
my $links = $DB->table('Links', 'CatLinks')->select ('Title', { CategoryID => $subcat->{ID} })->fetchall_hashref;
foreach my $link (@$links) {
$output .= "$link->{Title}";
}
}
return $output;

Last edited by:

Paul: Apr 9, 2003, 4:57 AM

Edit Log: