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
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!