Yes...it does...and the codes have been posted in some Threads recently....
Here it goes again...
1) Add the following codes:
in the
@EXPORT array section at the top of the
DB_Utils.pm file.
2) Add the following sub to your
DB_Utils.pm file:
Code:
sub get_totalcats {
#-----------------------------------------------------
my ($CATDB, $GRAND_TOTAL);
$GRAND_TOTAL = 0;
$CATDB = new Links::DBSQL "$LINKS{admin_root_path}/defs/Category.def";
$GRAND_TOTAL = $CATDB->total();
return $GRAND_TOTAL;
} 3) Then in your
HTML_Templates.pm, add the following global variable config:
Code:
totalcats => \&Links::DB_Utils::get_totalcats 4) And to print the total
NUMBER of categories, add the following tag in any of your template files:
Regards,
Eliot Lee