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 7620 Sep 29, 2009, 4:05 AM
Thread Re: [nir] Same level category
Andy 7533 Sep 29, 2009, 5:14 AM
Thread Re: [Andy] Same level category
nir 7511 Sep 29, 2009, 5:55 AM
Thread Re: [nir] Same level category
Andy 7490 Sep 29, 2009, 6:31 AM
Post Re: [Andy] Same level category
nir 7483 Sep 29, 2009, 6:47 AM
Thread Re: [nir] Same level category
EZFrag 7496 Sep 29, 2009, 6:48 AM
Thread Re: [EZFrag] Same level category
nir 7516 Sep 29, 2009, 7:03 AM
Thread Re: [nir] Same level category
Andy 7531 Sep 29, 2009, 7:08 AM
Thread Re: [Andy] Same level category
EZFrag 7494 Sep 29, 2009, 7:17 AM
Thread Re: [EZFrag] Same level category
Andy 7493 Sep 29, 2009, 7:18 AM
Post Re: [Andy] Same level category
nir 7466 Sep 29, 2009, 7:22 AM