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 (18436 posts)
Jun 9, 2010, 8:10 AM
Post #2 of 5
Views: 3673
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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
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
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Jun 9, 2010, 11:04 AM
Enthusiast (893 posts)
Jun 9, 2010, 11:04 AM
Post #3 of 5
Views: 3679
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 (18436 posts)
Jun 9, 2010, 11:27 PM
Post #5 of 5
Views: 3661
Hi,
Give the modified version above a go
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Give the modified version above a go

Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!