Hi Robert,
Its not a particularly tidy or well coded mod, I couldn't get it to work the way I had originally planned, but here it is:
Look for this in
search.cgi Code:
sub search_build_linked_title {
# --------------------------------------------------------
# Returns a string of the current category broken up
# by section, with each part linked to the respective section.
#
my $input = shift;
my (@dirs, $dir, $output, $path);
@dirs = split (/\//, $input);
for (0 .. $#dirs) {
$path = "/" . &build_clean_name( join "/", @dirs[0 .. $_] );
$output .= qq| <A HREF="$LINKS{build_root_url}$path/">$dirs[$_]</A> >|;
}
chop $output;
return $output;
}
Replace with this:
Code:
sub search_build_linked_title {
# --------------------------------------------------------
# Returns a string of the current category broken up
# by section, with each part linked to the respective section.
#
my $input = shift;
my (@dirs, $dir, $output, $path,
$last);
@dirs = split (/\//, $input);
$last = &search_build_linked_title_last(pop @dirs); for (0 .. $#dirs) {
$path = "/" . &build_clean_name( join "/", @dirs[0 .. $_] );
$output .= qq| $dirs[$_] >|; ## Remove URL from higher level cats
}
$output .= qq| <A HREF="$LINKS{build_root_url}$path$last</A> |; ## Add URL link to last cat
return $output;
}
sub search_build_linked_title_last {
# --------------------------------------------------------
# Returns a string of the last category
#
my $input = shift;
my (@dirs, $path);
@dirs = split (/\//, $input);
$path = "/" . &build_clean_name( join "/", @dirs[0 .. $_] ); ## Build usable dir name for last cat only
$input = qq|$path/">$dirs[$_]|; ## Add last cat path and name to pass back
return $input;
}
If anyone can post an improved version or give me guidance on a better way of coding it, please let me know.
All the best
Shaun