Try this (global adapted slightly from pugdog's post here):
<div><%linked_title ($ID,$Title,'>',2,0)%></div>
then create the the linked_title global:
# ------------------------------------------------------------------
# Generate a linked title.
#
# call with <%linked_title ($LinkID, $Title, ':', 0, 0)%>
# where the first two parameters are required, and you can
# add parameters 3, 4 and 5 in order
#
my $id = $_[0];
my $input = $_[1];
my $separator = $_[2] || ':';
my $home = $_[3] || 0;
my $complete = $_[4] || 0;
my (@dirs, $dir, $output, $path, $last, $db, $top);
$db = $DB->table('Category');
$top = Links::language('LINKS_TOP') || 'Top';
my ($cat_id, $cat_name) = %{$DB->table('Links')->get_categories ($_[0])};
$input = "$cat_name/$_[1]";
@dirs = split (/\//, $input);
$last = pop @dirs unless ($complete);
$output = $home ? qq| <a href="/">$top</a> $separator| : '';
for (0 .. $#dirs) {
$path = "/" . $db->as_url ( join "/", @dirs[0 .. $_] );
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> $separator|;
}
if ($complete) {
chop $output; chop $output;
}
else {
$output .= " $last";
}
$output=~ s/ & / & /sg;
return $output;
}
Can't remember what parameters 4 and 5 do exactly but this should get you started :).
<div><%linked_title ($ID,$Title,'>',2,0)%></div>
then create the the linked_title global:
Code:
sub { # ------------------------------------------------------------------
# Generate a linked title.
#
# call with <%linked_title ($LinkID, $Title, ':', 0, 0)%>
# where the first two parameters are required, and you can
# add parameters 3, 4 and 5 in order
#
my $id = $_[0];
my $input = $_[1];
my $separator = $_[2] || ':';
my $home = $_[3] || 0;
my $complete = $_[4] || 0;
my (@dirs, $dir, $output, $path, $last, $db, $top);
$db = $DB->table('Category');
$top = Links::language('LINKS_TOP') || 'Top';
my ($cat_id, $cat_name) = %{$DB->table('Links')->get_categories ($_[0])};
$input = "$cat_name/$_[1]";
@dirs = split (/\//, $input);
$last = pop @dirs unless ($complete);
$output = $home ? qq| <a href="/">$top</a> $separator| : '';
for (0 .. $#dirs) {
$path = "/" . $db->as_url ( join "/", @dirs[0 .. $_] );
$output .= qq| <a href="$CFG->{build_root_url}$path/$CFG->{build_index}">$dirs[$_]</a> $separator|;
}
if ($complete) {
chop $output; chop $output;
}
else {
$output .= " $last";
}
$output=~ s/ & / & /sg;
return $output;
}
Can't remember what parameters 4 and 5 do exactly but this should get you started :).