Gossamer Forum
Quote Reply
Same level category
I use this global to display category in the same level of the current category, this global work form the categoey.html, what changes I need to do so I call this category with the ID of the category - <%cat_list($catid)%> and it work?

sub {
my $args=shift;
my $db = $DB->table ('Category');
$db->select_options('ORDER BY Name DESC');
my $sth = $db->select ( {FatherID=>$args->{FatherID}});
my @cats;
while (my $cat = $sth->fetchrow_array) {
unless ($cat->{ID} == $args->{ID}) {
push @cats, $cat;
} }
return {more_cats_loop=>\@cats}
}
Subject Author Views Date
Thread Same level category nir 4542 Sep 29, 2009, 4:05 AM
Thread Re: [nir] Same level category
Andy 4507 Sep 29, 2009, 5:14 AM
Thread Re: [Andy] Same level category
nir 4479 Sep 29, 2009, 5:55 AM
Thread Re: [nir] Same level category
Andy 4469 Sep 29, 2009, 6:31 AM
Post Re: [Andy] Same level category
nir 4469 Sep 29, 2009, 6:47 AM
Thread Re: [nir] Same level category
EZFrag 4460 Sep 29, 2009, 6:48 AM
Thread Re: [EZFrag] Same level category
nir 4478 Sep 29, 2009, 7:03 AM
Thread Re: [nir] Same level category
Andy 4495 Sep 29, 2009, 7:08 AM
Thread Re: [Andy] Same level category
EZFrag 4464 Sep 29, 2009, 7:17 AM
Thread Re: [EZFrag] Same level category
Andy 4467 Sep 29, 2009, 7:18 AM
Post Re: [Andy] Same level category
nir 4448 Sep 29, 2009, 7:22 AM