I have this global that returns the category name on the details page. If I call with a GT filter tag I get an error. How can I fix this please?
<%ucfirst Cat_Name%>
sub {
my $tags = shift;
my $id = $tags->{'ID'};
my $db = $DB->table ('Category','CatLinks');
$db->select_options('LIMIT 1');
my $catid = $db->select ( { LinkID => $id }, ['Name'] )->fetchrow_array;
$catid =~ tr/A-Z/a-z/;
return $catid;
}
RETURNS:
Error: Variable 'Cat_Name' is not scalar
--------------------------------
Privacy Software
<%ucfirst Cat_Name%>
sub {
my $tags = shift;
my $id = $tags->{'ID'};
my $db = $DB->table ('Category','CatLinks');
$db->select_options('LIMIT 1');
my $catid = $db->select ( { LinkID => $id }, ['Name'] )->fetchrow_array;
$catid =~ tr/A-Z/a-z/;
return $catid;
}
RETURNS:
Error: Variable 'Cat_Name' is not scalar
--------------------------------
Privacy Software