Hi,
Not sure if this is what your trying to do (untested, so appologies if it doesn't work - still early morning with a little hangover ;))
Name the global: get_links_with_ext
Code:
sub {
my $cond = new GT::SQL::Condition;
foreach (qw/com org co.uk net/) {
$cond->add("%.$_/");
$cond->add("%.$_");
}
$cond-bool('OR');
my @links;
my $sth = $DB->table('Links')->select( $cond, { isValidated = "Yes" } ) || die $GT::SQL::error;
while (my $hit = $sth->fetchrow_hashref) {
push @links, $hit;
}
return { custom_links_loop => \@links };
}
..then call with:
Code:
<%get_links_with_ext%>
<ul>
<%loop custom_links_loop%>
<li><%Title%></li>
<%endloop%>
<ul>
Hope that helps.
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