I've modified the global and added the if statements in. I'm not quite sure what the <%if Detailed%> tag is? I've just put it in as a tag but I'm wondering whether it is a field in your Links table to say that some links go to detailed pages? If so, this will need modifying slightly.
sub {
my $id = shift;
my $tags = shift; #you need this to get all the available tags
my $db = $DB->table ('Links','CatLinks');
$db->select_options ('ORDER BY Hits DESC', 'LIMIT 10');
my $sth = $db->select ( { 'CatLinks.CategoryID' => $id}, ['Links.ID', 'Links.Title'], { isValidated => 'Yes'} );
my $popularcategory;
while (my ($id,$name) = $sth->fetchrow_array) {
if ($tags->{Detailed}){
$popularcategory .= qq~ <ul> <li><$tags->{body_font}><a class="category_links" href="$CFG->{db_cgi_url}/jump.cgi?ID=$id&Detailed=1">$name</a></font> ~;
}
else {
$popularcategory .= qq~ <ul> <li><$tags->{body_font}><a class="category_links" href="$CFG->{db_cgi_url}/jump.cgi?ID=$id">$name</a> ~;
}
}
return $popularcategory;
}
Haven't tested it so it might need debugging but it should point you in the right direction.
Laura.
The UK High Street