Page 1 of 1

[Solved] How to show the number of items in each category?

Posted: 03 Feb 2009, 18:59
by josray
Hi guys, many thanks to the Phoca Staff for the brillant work on their extensions, especially for Phoca Documentation which I find superb.

I have an issue that I'm sure could be usefoul also for other people.

When I link to a menu item the component (Phoca Documentation) it shows on the page a directory made with sections and categories. What I find limiting is that the component doesn't show immediately the number of items contained in each category. You can see that number only by entering in the category, but the user should know if an item is available in a category only by looking at the main page of the component.

Is there a way or a hack to make this possible?

Many thanks in advance.

Best regards

Jos

Re: [Req] How to show the number of items in each category?

Posted: 06 Feb 2009, 21:22
by Jan
Hi, the feature is there but not used (I will implement it as parameter value into the next version

Now you can change it in :
com_phocadocumentation/views/sections/tmpl/default.php

just uncomment the line 23

Jan

[Solved] How to show the number of items in each category?

Posted: 06 Feb 2009, 22:36
by josray
Thank you Jan!

FYI, it doesn't work just by uncommenting the line 23, you have to join togheter line 22 and 23:

before:

Code: Select all

line 22    $catOutput 	.= '<a href="'. JRoute::_('index.php?option=com_phocadocumentation&view=category&id='.$valueCat->id.':'.$valueCat->alias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $valueCat->title.'</a>';

line23     echo ' <small>('.$valueCat->numdoc.')</small></p>' . "\n";
after (all on one line):

Code: Select all

$catOutput .= '<a href="'. JRoute::_('index.php?option=com_phocadocumentation&view=category&id='.$valueCat->id.':'.$valueCat->alias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $valueCat->title.'</a> <small>('.$valueCat->numdoc.')</small></p>' . "\n";
Jos

Re: [Solved] How to show the number of items in each category?

Posted: 09 Feb 2009, 00:52
by Jan
Ok, yes ... thank you for this information...

Jan