Hi,
Thanks for your reply.
This is the code as I entered it in globals:
sub {
my $tags = shift;
my $cat_id = $tags->{'ID'};
my $name = $tags->{'Name'};
my $link_db = $DB->table('Links','CatLinks');
$link_db->select_options ("ORDER BY Title ASC");
my $sth = $link_db->select ( { CategoryID => $cat_id, isValidated => 'Yes' });
my $output = qq~ <b>$name:</b><br> ~;
while (my $link = $sth->fetchrow_hashref) {
$output .= qq~ <li>$link->{'Title'} ~;
}
my $cat_db = $DB->table('Category');
my $sth2 = $cat_db->select ( ['ID','Name'],{ FatherID => $cat_id });
while (my ($child_id,$subname) = $sth2->fetchrow_array){
$output .= qq~ <br><br><b>$subname:</b><br> ~;
$link_db->select_options ("ORDER BY Title ASC");
my $sth3 = $link_db->select ( { CategoryID => $child_id, isValidated => 'Yes' });
while (my $link2 = $sth3->fetchrow_hashref) {
$output .= qq~ <li>$link2->{'Title'} ~;
}
}
return $output;
}
Works great. But its not linking the title with the url associated with it and its not displaying the description. Ive tweaked it to the best of my knowledge, but I only get errors...
Any ideas?
Thank you
Thanks for your reply.
This is the code as I entered it in globals:
sub {
my $tags = shift;
my $cat_id = $tags->{'ID'};
my $name = $tags->{'Name'};
my $link_db = $DB->table('Links','CatLinks');
$link_db->select_options ("ORDER BY Title ASC");
my $sth = $link_db->select ( { CategoryID => $cat_id, isValidated => 'Yes' });
my $output = qq~ <b>$name:</b><br> ~;
while (my $link = $sth->fetchrow_hashref) {
$output .= qq~ <li>$link->{'Title'} ~;
}
my $cat_db = $DB->table('Category');
my $sth2 = $cat_db->select ( ['ID','Name'],{ FatherID => $cat_id });
while (my ($child_id,$subname) = $sth2->fetchrow_array){
$output .= qq~ <br><br><b>$subname:</b><br> ~;
$link_db->select_options ("ORDER BY Title ASC");
my $sth3 = $link_db->select ( { CategoryID => $child_id, isValidated => 'Yes' });
while (my $link2 = $sth3->fetchrow_hashref) {
$output .= qq~ <li>$link2->{'Title'} ~;
}
}
return $output;
}
Works great. But its not linking the title with the url associated with it and its not displaying the description. Ive tweaked it to the best of my knowledge, but I only get errors...
Any ideas?
Thank you