Gossamer Forum
Quote Reply
HASH ?
Something not quite right here...

sub {
# Displays all links.
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Add_Date DESC');
my $sth = $table->select({ isValidated => 'Yes' });
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { test_loop => \@output };
}

Then...

<%loop test_loop%>
<a href="<%detailed_url%>"><%Title%></a>
<%endloop%>


But the output to the detailed page is:

http://www.mysite.com/Detailed/HASH(0x9182ca4).html

HASH ??

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] HASH ? In reply to
Hmm..

It seems that every global that uses a Loop is not using <a href="<%detailed_url%>"> correctly. Every one has this HASH in the detailed URL.

Any ideas?

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] HASH ? In reply to
sub {
# Displays all links.
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY Add_Date DESC');
my $sth = $table->select({ isValidated => 'Yes' });
my @output;
while (my $link = $sth->fetchrow_hashref) {

$link->{detailed_url} = "$CFG->{build_detail_url}/$link->{'LinkID'}$CFG->{build_extension}";
push (@output, $link);
}
return { test_loop => \@output };
}
Quote Reply
Re: [afinlr] HASH ? In reply to
Superb afinlr,

I just had to change {'LinkID'} to {'ID'} in your code. I really apreact your help!
Thanks.

--------------------------------
Privacy Software