Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: FatherID Issue: Edit Log

Here is the list of edits for this post
FatherID Issue
Displaying categories on the home page with this global. (Build directory for the cats is actually elsewhere)

The problem is with a FatherID => 0 shows the top level cats OK, but when wanting show those cats below the top level: FatherID => 1 nothing shows. Any ideas?

sub {
# lists categories
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options('ORDER BY Name ASC');
my $sth = $cat_db->select ( { FatherID => 1}, ['Full_Name','Name'] );
my @output;
while (my $cat = $sth->fetchrow_hashref) {
$cat->{URL} = "$CFG->{build_root_url}/" . $cat_db->as_url($cat->{Full_Name}) . "/";
push @output, $cat;
}
return {cats_loop => \@output};
}

~ ERASER


Free JavaScripts @ Insight Eye

Last edited by:

Eraser: Dec 4, 2006, 11:31 AM

Edit Log: