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

related category in global

Quote Reply
related category in global
Can someone help me alter this global to also show related categorys
global:
<%cat_mainmenuarrow('$ID','$field')%>

sub {
my $catid = shift;
my $field = $_[0];
my $in_id = $IN->param('CatLinks.CategoryID') || $IN->param('ID');
my $table = $DB->table('Category');
my $return_cats;
$table->select_options ('ORDER BY Full_Name ASC');
my $sth = $table-> select ( { FatherID => $field });
my $return_cats = qq||;
while (my $hit = $sth->fetchrow_hashref) {
$return_cats .= "<div style =\"padding-top:5px;size:14px\"";
$return_cats .= ">";
$return_cats .= "<img src =\"/images/default/icon_arrow_orange.gif\"";
$return_cats .= ">&nbsp;";
$return_cats .= "<a href =\"/cgi-bin/dir/page.cgi?d=1&g=" . $hit->{Full_Name} . "/index.html&d=1\"";
if ($catid == $hit->{ID}) { $return_cats .= " class=2"; }
$return_cats .= ">" . $hit->{Name} . "</a></div><br>";
}
$return_cats .= '';
return $return_cats;
}


thanks
Quote Reply
Re: [ajiimd] related category in global In reply to
please help