Thanks again, Adrian. Yes, I did change
to
so that the list is sorted alphabetically.
I also made a variation of the global, which I call AllCats:
my $category = $DB->table('Category');
$category->select_options('ORDER BY Name');
my $sth = $category->select( ['Has_New_Links','Number_of_Links','Name','Full_Name'] );
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 };
}That produces this page showing all my categories, with highlighted ones with new or many links.
The only remaining issue is the issue with Has_New_Links mentioned above. That's beyond my programming skills, so I hope someone will pick up on this.
John
Code:
$category->select_options('ORDER BY Full_Name');Code:
$category->select_options('ORDER BY Name');I also made a variation of the global, which I call AllCats:
Code:
sub { my $category = $DB->table('Category');
$category->select_options('ORDER BY Name');
my $sth = $category->select( ['Has_New_Links','Number_of_Links','Name','Full_Name'] );
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 };
}
The only remaining issue is the issue with Has_New_Links mentioned above. That's beyond my programming skills, so I hope someone will pick up on this.
John