Count all active in Category

More
12 years 4 months ago #27848 by igcorreia
Hello how can I know the total items active from a category.

I have open cateogry_items.php and the:
Code:
$items = $this->items; $count = count($items);
gives me the total but of the pagination not the total in the category.

Any ideas?

Joomla 1.5

Please Log in or Create an account to join the conversation.

More
12 years 4 months ago #27850 by ggppdk
Replied by ggppdk on topic Count all active in Category
To get a raw number of total items (no HTML tags, just the number):

either get it from pagination Object

$count = $this->pageNav->total;

or better from the category model:

$count = $this->getTotal();

PLEASE NOTE: this is the total number of items according to current filtering, search box, alpha-index


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.603 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline