Gossamer Forum
Quote Reply
Changing Title_Linked
Hi-

I need to make a change to the <%title_linked%> output on the category pages. Currently it creates the breadcrumb trail using the value of 'Name' from the category table.

e.g. Top : Category Name : Sub Category Name

But I need it to use a custom category column value 'Title_Linked_Name' that I would specify for each category instead of the 'Name'. Is this possible to do? I was checking the Build.pm, but couldn't figure out how to do it from the sub build_title_linked section noted below. Or could this be done with a global? Any advice would be greatly appreciated.

--FrankM


Code:

sub build_title_linked {
# ------------------------------------------------------------------
# Generate a linked title.
#
my $input = shift;
my $complete = 0;
my $home = 1;
if (ref $input) {
$complete = $input->{complete} || 0;
$home = defined $input->{home} ? $input->{home} : 1;
$input = $input->{name};
}
my (@dirs, $dir, $output, $path, $last, $db, $top);

$db = $DB->table('Category');
$top = Links::language('LINKS_TOP') || 'Top';
@dirs = split (/\//, $input);
$last = pop @dirs unless ($complete);
$output = $home ? qq| <a href="index.htm">$top</a>"/", @dirs[0 .. $_] );
$output .= qq| <a href="$CFG->{build_root_url}
$path/$CFG->{build_index}">$dirs[$_]</a> :|;
}
if ($complete) {
chop $output; chop $output;
}
else {
$output .= " $last";
}
return $output;
}
END_OF_SUB