Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Alex] Get Latest Review on Detailed Page: Edit Log

Here is the list of edits for this post
Re: [Alex] Get Latest Review on Detailed Page
Gents,

The global name is definitely correct and there are no leading spaces around sub.... Some thing else here?

Alex - could this have anything to do with the fact that my DB and scripts are now on different machines? Just throwing out ideas....

Reason why I'm asking is becasue the global below, which used to work, now throws the same error. This global builds a "bread crumb trail" for the title on the reviews pages.

Quote:
sub {
my $link_id = shift;
my $title_comment = shift;

my $link_db = $DB->table('Links');

my $link = $link_db->select({ ID => $link_id })->fetchrow_hashref;
my ($cat_id, $cat_name) = each %{$link_db->get_categories ($link->{ID})};
my $title = Links::Build::build ('title_linked', { name => "$cat_name",
home => 1,
complete => 1 });
$title .= qq~ : <a href ="$CFG->{build_detail_url}/$link->{ID}$CFG->{build_extension}">$link->{Title}</a> : ~;
$title .= $title_comment;

return $title;
}

Calling this with: <%review_title_linked($ID, 'Reviews')%>

Safe swoops
Sangiro

Last edited by:

sangiro: Oct 24, 2003, 3:32 PM

Edit Log: