Gossamer Forum
Quote Reply
/ in title
Hi again,

I've yet another problem. In my links title's there typically is a "/" because this is a database containing Danish companies and therefore it's ab problem for the <%title_linked%> tag cuts off some of the links when there is a /.

Please help me
Quote Reply
Re: / in title In reply to
Hmm.. Can you try replacing build_linked_title in DB_Utils.pm with:

Code:
sub 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 = pop @dirs;
$output = qq| <A HREF="$LINKS{build_root_url}/">Top</A> :|;
for (0 .. $#dirs) {
$path = "/" . &build_clean_name( join "/", @dirs[0 .. $_] );
my $cid = &get_category_id (join "/", @dirs[0 .. $_]);
if (! $cid) {
$last = (join "/", @dirs[$_ .. $#dirs]) . "/" . $last;
last;
}
$output .= qq| <A HREF="$LINKS{build_root_url}$path/">$dirs[$_]</A> :|;
}
$output .= " $last";
return $output;
}

Let me know how it works..

Cheers,

Alex
Quote Reply
Re: / in title In reply to
It works like a charm thanks a lot.