Hi
Andy
A global to include home catégories on another pages.
my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options ('ORDER BY Name');
my $sth = $cat_db->select ( { FatherID => 0}, ['Full_Name','Name','Number_of_Links'] );
my $output="";
while (my ($root_cat,$full_name,$number_of_links) = $sth->fetchrow_array) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<li><a href="$CFG->{build_root_url}/$url/"> $full_name</a>($number_of_links)</li>~;
}
return $output;
}
Andy
A global to include home catégories on another pages.
Code:
sub { my $tags = shift;
my $cat_db = $DB->table('Category');
$cat_db->select_options ('ORDER BY Name');
my $sth = $cat_db->select ( { FatherID => 0}, ['Full_Name','Name','Number_of_Links'] );
my $output="";
while (my ($root_cat,$full_name,$number_of_links) = $sth->fetchrow_array) {
my $url = $cat_db->as_url($root_cat);
$output .= qq~<li><a href="$CFG->{build_root_url}/$url/"> $full_name</a>($number_of_links)</li>~;
}
return $output;
}