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

Priority Links by Category ?

Quote Reply
Priority Links by Category ?
I've modified a couple of existing globals found in the forum and resources section to give me the Priority links by category, but I need to incorporate variations in the display.

sub {
# Displays the isPriority links per category on the category home pages.
my $id = shift;
my $db = $DB->table ('Links','CatLinks');
$db->select_options ('ORDER BY isPriority DESC', 'LIMIT 10');
my $sth = $db->select ( { isPriority => 'Yes'}, { 'CatLinks.CategoryID' => $id}, ['Links.ID', 'Links.Title', , 'Links.URL'], { isValidated => 'Yes'} );
my $premium;
while (my ($id,$name,$url) = $sth->fetchrow_array) {
$premium .= "<a href='$url'>$name</a><br>";
}
return $premium;
}


The out put / display I'm chasing is in the following global

sub {
# Displays the isPriority logo and links on the home page.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC Limit 5');
$sth = $search_db->select ( { isPriority => 'Yes'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link2', $link);
}
return $output;
}


So what I need to do is use the output type in the 2 nd global and incorporate it in the 1 st one.

Any pointers would be appreciated.

Regards

minesite
Subject Author Views Date
Thread Priority Links by Category ? minesite 2981 Apr 7, 2002, 1:22 AM
Thread Re: [minesite] Priority Links by Category ?
minesite 2837 Apr 10, 2002, 5:34 PM
Thread Re: [minesite] Priority Links by Category ?
pugdog 2797 Apr 11, 2002, 6:54 PM
Thread Re: [pugdog] Priority Links by Category ?
minesite 2798 Apr 11, 2002, 11:36 PM
Post Re: [minesite] Priority Links by Category ?
minesite 2761 Apr 13, 2002, 3:35 PM