Keep it simple, all you need to do is use the Has_New_Links column. Do all the html generation in the code also:
my $category = $DB->table('Category');
$category->select_options('ORDER BY Full_Name');
my $sth = $category->select({ Has_New_Links => 'Yes' });
my @cats;
while (my $cat = $sth->fetchrow_hashref) {
$cat->{URL} = "$CFG->{build_root_url}/" . $category->as_url($cat->{Full_Name}) . "/$CFG->{build_index}";
push @cats, $cat;
}
return { new_categories => \@cats };
}In the loop, you can do your technorati tags:
<%loop new_categories%>
<a href="<%URL%>"<%if Number_of_Links > 50%> class="whatever"<%endif%>><%Name%></a>
<%endloop%>
Adrian
Code:
sub { my $category = $DB->table('Category');
$category->select_options('ORDER BY Full_Name');
my $sth = $category->select({ Has_New_Links => 'Yes' });
my @cats;
while (my $cat = $sth->fetchrow_hashref) {
$cat->{URL} = "$CFG->{build_root_url}/" . $category->as_url($cat->{Full_Name}) . "/$CFG->{build_index}";
push @cats, $cat;
}
return { new_categories => \@cats };
}
Code:
<%nameofsub%> <%loop new_categories%>
<a href="<%URL%>"<%if Number_of_Links > 50%> class="whatever"<%endif%>><%Name%></a>
<%endloop%>
Adrian