Okay, here is what I've been working on for the last two hours...
I created a column (enum) called LinkType with the following values: 'link' and 'article'
I put:
<%if links%>
<hr size=1>
<%articlelist%>
<hr size=1>
<%linklist%>
<%endif%>
in my category template and created the following globals:
------------------------------------------------------------
sub {
# lists the articles.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC','Limit 10');
$sth = $search_db->select ( { LinkType => 'article'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}
--------------------------------------------------------------
sub {
# lists the links.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC','Limit 10');
$sth = $search_db->select ( { LinkType => 'link'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link1', $link);
}
return $output;
}
Problem is it lists all the articles/links on the entire site on the subcategory pages, and am trying to just pull the articles/links from the subcategory???
Any suggestions....
</not a clue>
I created a column (enum) called LinkType with the following values: 'link' and 'article'
I put:
<%if links%>
<hr size=1>
<%articlelist%>
<hr size=1>
<%linklist%>
<%endif%>
in my category template and created the following globals:
------------------------------------------------------------
sub {
# lists the articles.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC','Limit 10');
$sth = $search_db->select ( { LinkType => 'article'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link', $link);
}
return $output;
}
--------------------------------------------------------------
sub {
# lists the links.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC','Limit 10');
$sth = $search_db->select ( { LinkType => 'link'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link1', $link);
}
return $output;
}
Problem is it lists all the articles/links on the entire site on the subcategory pages, and am trying to just pull the articles/links from the subcategory???
Any suggestions....
</not a clue>