I guess that all depends on how you want it to display. The easiest method I can think of is to use a new perl file (featured.cgi) and include it using SSI; or you could just directly use featured.cgi with something like:
#!/usr/bin/perl
#================================
use strict;
use lib 'path/to/admin';
use Links qw/$DB $IN/;
Links::init('/path/to/admin');
use Links::SiteHTML;
local $SIG{__DIE__} = \&Links::fatal;
main();
sub main {
#---------------------------------------------------
#
my ($sth,$tab,$output);
$tab = $DB->table('Links');
$tab->select_options('LIMIT 2');
$sth = $tab->select( { isValidated => 'Yes', isFeatured => 'Yes' } );
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link', $rec);
}
print $IN->header();
print Links::SiteHTML::display('your template name', $output);
}
Hopefully this code will work (I just copied it from other stuff). Limit is how many featured you want to display. Fill in the paths and template names and you should be good to go.
Good Luck!
- Jonathan
Code:
#!/usr/bin/perl
#================================
use strict;
use lib 'path/to/admin';
use Links qw/$DB $IN/;
Links::init('/path/to/admin');
use Links::SiteHTML;
local $SIG{__DIE__} = \&Links::fatal;
main();
sub main {
#---------------------------------------------------
#
my ($sth,$tab,$output);
$tab = $DB->table('Links');
$tab->select_options('LIMIT 2');
$sth = $tab->select( { isValidated => 'Yes', isFeatured => 'Yes' } );
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link', $rec);
}
print $IN->header();
print Links::SiteHTML::display('your template name', $output);
}
Hopefully this code will work (I just copied it from other stuff). Limit is how many featured you want to display. Fill in the paths and template names and you should be good to go.
Good Luck!
- Jonathan