Gossamer Forum
Home : Products : Links 2.0 : Customization :

categories in search results

Quote Reply
categories in search results
Hi,
Is there anyway to change the category name as it appears in the search results. Currently the category name appears as the directory name ie. with underscores _
Is there a way to have the category description displayed in the search results instead of the category directory name?
I know the search.cgi needs to be modified as it uses links.db... but is there a possible mod that can by pass this?
Quote Reply
Re: [tightline] categories in search results In reply to
At the bottom of search.cgi you should have this:

sub build_linked_title {
# --------------------------------------------------------
# A little different then the one found in nph-build.cgi as it also
# links up the last field as well.
my ($input) = shift;
my ($dir, $output, $path, $last);
foreach $dir ((split m!/!, $input)) {
$path .= "/$dir";
$dir = &build_clean ($dir);
$output .= qq|<A HREF="$build_root_url$path/">$dir</A>:|;
}
chop ($output);
return $output;
}

This line: $dir = &build_clean ($dir);
...should remove the underscores from your cat names.


Leonard
aka PerlFlunkie