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

Re: [ajiimd] exclude category in dropdown mene

Quote Reply
Re: [ajiimd] exclude category in dropdown mene In reply to
i figured it out:

sub {
my $catid = shift;
my $table = $DB->table('Category');
my $return_cats;
$table->select_options ('ORDER BY Full_Name ASC');
my $cond = GT::SQL::Condition->new('isHidden','=','No');
my $sth = $table->select( $cond );
my $return_cats = qq|<select name="$catid">|;
while (my $hit = $sth->fetchrow_hashref) {
$return_cats .= "<option value=\"" . $hit->{ID} . "\"";
if ($catid == $hit->{ID}) { $return_cats .= "selected=\"selected\""; }
$return_cats .= ">" . $hit->{Full_Name} . "</option>";
}
$return_cats .= '</select>';
return $return_cats;
}


hope this helps someone
Subject Author Views Date
Thread exclude category in dropdown mene ajiimd 3366 Aug 28, 2004, 11:19 PM
Thread Re: [ajiimd] exclude category in dropdown mene
ajiimd 3253 Aug 29, 2004, 1:43 PM
Thread Re: [ajiimd] exclude category in dropdown mene
ajiimd 3301 Aug 29, 2004, 6:44 PM
Post Re: [ajiimd] exclude category in dropdown mene
ajiimd 3250 Aug 31, 2004, 3:59 AM
Thread Re: [ajiimd] exclude category in dropdown mene
Andy 3234 Sep 4, 2004, 12:31 AM
Thread Re: [Andy] exclude category in dropdown mene
ajiimd 3230 Sep 4, 2004, 6:04 AM
Post Re: [ajiimd] exclude category in dropdown mene
Andy 3222 Sep 4, 2004, 7:51 AM