Gossamer Forum
Quote Reply
loop on detailed pages
I use some loops and they runs fine, except on the detailed.html and modify pages.

This global does not work on detailed pages:

sub {
my $tags = shift;
my $table = $DB->table('Links');
$table->select_options ('ORDER BY ID DESC', 'LIMIT 10');
my $sth = $table->select ({ top5 => 'Yes' } );
my @output;
while (my $link = $sth->fetchrow_hashref) {
$link->{Title} = (length $link->{Title} > 30) ? substr($link->{Title},0,30) . ' ...' : $link->{Title};
push (@output, $link);
}
return { top5_loop => \@output };
}



What can be the reason that I canīt use this global at detailed and modify?

This global runs fine on all pages:

sub {
my $tags = shift;
my $table = $DB->table('Category');
$table->select_options ('ORDER BY sort DESC', 'LIMIT 20');
my $sth = $table->select ( { FatherID => '0' } );
my @output;
while (my $link = $sth->fetchrow_hashref) {
$link->{Name} = (length $link->{Name} > 30) ? substr($link->{Name},0,30) . ' ...' : $link->{Name};
push (@output, $link);
}
return { Lastlinks5_loop => \@output };
}

Itīs nearly the same, just to show categories instead links.

Any idea?

--
Michael Skaide

http://www.skai.de

--
Michael Skaide

http://www.cycle24.de

Subject Author Views Date
Thread loop on detailed pages Sir Up 3135 Apr 3, 2002, 4:56 AM
Post Re: [Sir Up] loop on detailed pages
Sir Up 2923 Oct 13, 2002, 5:28 AM
Thread Re: [Sir Up] loop on detailed pages
Alex 2904 Oct 25, 2002, 3:53 PM
Thread Re: [Alex] loop on detailed pages
Sir Up 2867 Nov 1, 2002, 3:16 PM
Thread Re: [Sir Up] loop on detailed pages
Alex 2854 Nov 2, 2002, 8:31 AM
Post Re: [Alex] loop on detailed pages
Sir Up 2844 Nov 2, 2002, 10:56 AM