Untested (replace FieldName):
sub {
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options ("ORDER BY FieldName DESC");
my $sth = $cat_db->select (['Full_Name'], { FatherID => 0 });
my $output;
while ( my $root_cat = $sth->fetchrow_array) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<a href="$CFG->{build_root_url}/$url">$root_cat</a><br>~;
}
return $output;
}
Code:
sub {
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options ("ORDER BY FieldName DESC");
my $sth = $cat_db->select (['Full_Name'], { FatherID => 0 });
my $output;
while ( my $root_cat = $sth->fetchrow_array) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<a href="$CFG->{build_root_url}/$url">$root_cat</a><br>~;
}
return $output;
}