Try this:
sub {
my ($all_ids,@list,$output);
my $tags = shift;
$cat_id = $tags->{'ID'};
$all_ids = $DB->table('Category')->children($cat_id);
my $link_db = $DB->table('Links','CatLinks','Category');
$link_db->select_options ("ORDER BY Add_Date DESC"); #Change this to change the order
my $condition = GT::SQL::Condition->new( 'isValidated','=','Yes','CategoryID', 'IN', \@$all_ids);
my $sth = $link_db->select($condition);
while (my $link = $sth->fetchrow_hashref) {
push @list, $link;
}
foreach my $link (@list) {
my $detailed_url = "$CFG->{build_detail_url}/$link->{'LinkID'}$CFG->{build_extension}";
$output .= qq~<option value="$detailed_url">$link->{'Title'}~;
}
return $output;
}
You will need to put this within your <select></select> tags for the drop-down list.
Laura.
The UK High Street
sub {
my ($all_ids,@list,$output);
my $tags = shift;
$cat_id = $tags->{'ID'};
$all_ids = $DB->table('Category')->children($cat_id);
my $link_db = $DB->table('Links','CatLinks','Category');
$link_db->select_options ("ORDER BY Add_Date DESC"); #Change this to change the order
my $condition = GT::SQL::Condition->new( 'isValidated','=','Yes','CategoryID', 'IN', \@$all_ids);
my $sth = $link_db->select($condition);
while (my $link = $sth->fetchrow_hashref) {
push @list, $link;
}
foreach my $link (@list) {
my $detailed_url = "$CFG->{build_detail_url}/$link->{'LinkID'}$CFG->{build_extension}";
$output .= qq~<option value="$detailed_url">$link->{'Title'}~;
}
return $output;
}
You will need to put this within your <select></select> tags for the drop-down list.
Laura.
The UK High Street