Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Complete list of links

Quote Reply
Complete list of links
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.
Quote Reply
Re: [joeybone] Complete list of links In reply to
New global "load_all_links"

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!

Last edited by:

Andy: Jun 9, 2010, 11:26 PM
Quote Reply
Re: [joeybone] Complete list of links In reply to
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
Quote Reply
Re: [Andy] Complete list of links In reply to
Excellent!

Is there some option in there for sorting results? At the the moment they are sorted by ID.

BTW, the 'Home' page is not actually the site's front page, but serves as a master list for quick look up. very handy.

Thanks for all your help.
Quote Reply
Re: [joeybone] Complete list of links In reply to
Hi,

Give the modified version above a go Smile

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!