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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am

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

Post 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
skypanther

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

Post 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
Post Reply

Return to “CMSMS Core”