Page 1 of 1

Company Directory - Can I display total number of businesses in database?

Posted: Wed Mar 21, 2007 1:27 am
by Darwin Web Design
Hi,
Im using company directory 1.0.4 with Lanai CMSMS.

Company Directory is very good, I like it a lot and could be taken a lot further.  One feature I would like, if possible is to have a 'total number of entries' displayed.  So it automatically counts the number of companies in the database and can display this on the page somehow.  - even better if each category could have the total entries in brackets after the category name.  But if this is too hard, just one total would be excellent.

If this is something do-able, I'd be keen to hear from anyone who could tell me how to go about adding this.  Unfortunately I'm not a coder so am in the dark whether this is a big job or something simple.

Thanks
:D

Re: Company Directory - Can I display total number of businesses in database?

Posted: Wed Mar 21, 2007 12:38 pm
by skypanther
AFAIK this isn't included in the current code. You should put it in as a feature request (there's a spot for that on the Forge page for this module). As for adding it in yourself, you'll have to modify the SQL statement to include a count(fieldname) and then stuff that info into a smarty variable. I'd look for that in the action.default.php file. Without doing a bunch of digging, I can't be too much more specific than that. I'm afraid I'm tied up with other things so it's nothing I can try to do now. Maybe someone else. That's why you should put it in as a feature request so that it's tracked and someone can get to it.

Tim