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

Re: [tyranny] Need help with Drop Down subcategory link list

Quote Reply
Re: [tyranny] Need help with Drop Down subcategory link list In reply to
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
Subject Author Views Date
Thread Need help with Drop Down subcategory link list tyranny 8303 Feb 23, 2003, 10:46 PM
Thread Re: [tyranny] Need help with Drop Down subcategory link list
afinlr 8138 Feb 25, 2003, 5:46 AM
Thread Re: [afinlr] Need help with Drop Down subcategory link list
tyranny 8189 Feb 25, 2003, 6:37 AM
Thread Re: [tyranny] Need help with Drop Down subcategory link list
afinlr 8166 Feb 25, 2003, 6:46 AM
Thread Re: [afinlr] Need help with Drop Down subcategory link list
tyranny 8150 Feb 25, 2003, 6:54 AM
Thread Re: [tyranny] Need help with Drop Down subcategory link list
afinlr 8118 Feb 25, 2003, 7:15 AM
Thread Re: [afinlr] Need help with Drop Down subcategory link list
tyranny 8122 Feb 25, 2003, 8:31 AM
Thread Re: [tyranny] Need help with Drop Down subcategory link list
afinlr 8156 Feb 25, 2003, 8:50 AM
Thread Re: [afinlr] Need help with Drop Down subcategory link list
tyranny 8179 Feb 25, 2003, 9:10 AM
Thread Re: [tyranny] Need help with Drop Down subcategory link list
afinlr 8145 Feb 25, 2003, 9:49 AM
Post Re: [afinlr] Need help with Drop Down subcategory link list
tyranny 8125 Feb 25, 2003, 10:11 AM
Thread Re: [afinlr] Need help with Drop Down subcategory link list
ajiimd 7890 Nov 24, 2004, 8:02 AM
Thread Re: [ajiimd] Need help with Drop Down subcategory link list
afinlr 7861 Nov 24, 2004, 8:19 AM
Thread Re: [afinlr] Need help with Drop Down subcategory link list
ajiimd 7900 Nov 24, 2004, 10:28 AM
Thread Re: [ajiimd] Need help with Drop Down subcategory link list
afinlr 7803 Nov 24, 2004, 10:34 AM
Post Re: [afinlr] Need help with Drop Down subcategory link list
ajiimd 7777 Nov 24, 2004, 11:56 AM
Post Re: [tyranny] Need help with Drop Down subcategory link list
afinlr 8172 Feb 25, 2003, 6:51 AM