I'm guessing there is an easy way to have a complete list of links on the front page... but unfortunately I can't hit on any good idea. would anyone out there know? cheers.
Jun 9, 2010, 8:10 AM
Veteran / Moderator (17366 posts)
Jun 9, 2010, 8:10 AM
Post #2 of 5
Views: 477
New global "load_all_links"
my $tbl = $DB->table('Links');
$tbl->select_options("ORDER BY Title DESC");
my $sth = $tbl->select( { isValidated => "Yes" } );
my @loop;
while (my $hit = $sth->fetchrow_hashref) {
$hit->{detailed_url} = $CFG->{build_detail_url} . "/" . $DB->table('Links')->detailed_url( $hit->{ID} );
push @loop, $hit;
}
return { all_links_loop => \@loop }
}
Then call with:
<%loop all_links_loop%>
<%include link.html%>
<%endloop%>
Pretty simple :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Code:
sub { my $tbl = $DB->table('Links');
$tbl->select_options("ORDER BY Title DESC");
my $sth = $tbl->select( { isValidated => "Yes" } );
my @loop;
while (my $hit = $sth->fetchrow_hashref) {
$hit->{detailed_url} = $CFG->{build_detail_url} . "/" . $DB->table('Links')->detailed_url( $hit->{ID} );
push @loop, $hit;
}
return { all_links_loop => \@loop }
}
Then call with:
Code:
<%load_all_link%> <%loop all_links_loop%>
<%include link.html%>
<%endloop%>
Pretty simple :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Jun 9, 2010, 11:04 AM
Enthusiast (833 posts)
Jun 9, 2010, 11:04 AM
Post #3 of 5
Views: 475
joeybone wrote:
I'm guessing there is an easy way to have a complete list of links on the front page... but unfortunately I can't hit on any good idea. would anyone out there know? cheers.Do you really need all links on the frontpage?
Why should I serve other pages of your site, when I can see everything on the frontpage...
Matthias
gpaed.de
Jun 9, 2010, 11:27 PM
Veteran / Moderator (17366 posts)
Jun 9, 2010, 11:27 PM
Post #5 of 5
Views: 459
Hi,
Give the modified version above a go
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates
Give the modified version above a go
Cheers
Andy (mod)
andy@ultranerds.co.uk
IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates

