This global should catch top level categories and display it accross all site.
my $tags = shift;
my $cat_db = $DB->table('Category');
my @root_cats = $cat_db->select (['Full_Name'], { FatherID => 0 })->fetchall_list;
my $output;
foreach my $root_cat (@root_cats) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<li class="detail"><a href="$url">$root_cat</a></li>~;
}
return $output;
}
However, it doesn't work good. When I'm in root, it's ok. But when I go in some subdirectory, URL to displayed TOP LEVEL categories isn't right.
I like PHP but dislike PERL so don't know how to fix it
Regards.
UnReal Network
Code:
sub { my $tags = shift;
my $cat_db = $DB->table('Category');
my @root_cats = $cat_db->select (['Full_Name'], { FatherID => 0 })->fetchall_list;
my $output;
foreach my $root_cat (@root_cats) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<li class="detail"><a href="$url">$root_cat</a></li>~;
}
return $output;
}
However, it doesn't work good. When I'm in root, it's ok. But when I go in some subdirectory, URL to displayed TOP LEVEL categories isn't right.
I like PHP but dislike PERL so don't know how to fix it

Regards.
UnReal Network