Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [nir] Cat new link: Edit Log

Here is the list of edits for this post
Re: [nir] Cat new link
Untested, but try this:

sub {
my @cat_ids = split /,/, $_[0];

my $cond = new GT::SQL::Condition;
foreach (@cat_ids) { $cond->add('CatLinks.CategoryID','=',$_) }


my $tbl = $DB->table('CatLinks','Links','CatLinks');
$tbl->select_options("ORDER BY Title");

my $sth = $tbl->select( ['Links.*'], $cond, { isNew => "Yes" } ) || die $GT::SQL::error;

my @loop;
while (my $hit = $sth->fetchrow_hashref) {
push @loop, $hit;

return { links_loop_by_cat => \@loop }


Call with:

<%if links_loop_by_cat.length%>
<%loop links_loop_by_cat%>
<%include link.html%>



..with the list of Categories you want to select from.

Hopefully that will work =)


Andy (mod)
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: Jul 29, 2008, 5:54 AM

Edit Log: