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

Re: [Andy] list of subcategory

Quote Reply
Re: [Andy] list of subcategory In reply to
Thanks,

There was a small bug I change it and now it work
One thing – Not it display the category and the subcategory, his there a way that it will not display the category. I mean if I use <%get_categorys_by_id(2)%>
That it will display the subcategory of "2" but not the "2" itself

sub { my $cat = shift; my $all_ids = $DB->table('Category')->children($cat); push @$all_ids, $cat; my $tbl = $DB->table('Category'); $tbl->select_options ('ORDER BY Full_Name'); my $cond = GT::SQL::Condition->new('ID', 'IN', $all_ids); my $sth = $tbl->select ( $cond ) || die $GT::SQL::error; my @cats; while (my $hit = $sth->fetchrow_hashref) { $hit->{URL} = $CFG->{build_root_url} . $tbl->as_url($hit->{Full_Name}) . '/' . $CFG->{build_index}; push @cats, $hit; } return { cat_loop => \@cats } }
Subject Author Views Date
Thread list of subcategory nir 3859 Jul 24, 2008, 4:40 AM
Thread Re: [nir] list of subcategory
Andy 3687 Jul 24, 2008, 4:50 AM
Thread Re: [Andy] list of subcategory
nir 3686 Jul 24, 2008, 4:54 AM
Thread Re: [nir] list of subcategory
Andy 3680 Jul 24, 2008, 5:54 AM
Thread Re: [Andy] list of subcategory
nir 3676 Jul 24, 2008, 6:40 AM
Thread Re: [nir] list of subcategory
Andy 3670 Jul 24, 2008, 6:41 AM
Post Re: [Andy] list of subcategory
nir 3669 Jul 24, 2008, 6:51 AM