Page 1 of 1

Remove Category Count

Posted: 29 Nov 2008, 05:51
by keepitfrozen
Jan i looked thru the forum and didn't see this one asked so if it's a repeat I apologize. :( Is there some way to remove the "red" category count from the section header? maybe just comment out some code or something.

thanks,

Mark

Re: Remove Category Count

Posted: 01 Dec 2008, 11:05
by akerman
Hi Mark,

Since there is no switch or parameter for the 'count' feature in 'Sections' and 'Section' views, we have to edit this by hand. So, here is the solution you're looking for:

1. Go to /components/com_phocadownload/views/sections/tmpl/..
2. Open the file 'default.php' (Make a backup/copy first :wink: )
3. At about line 18 you find the place of interest

<div id="phoca-dl-sections-box">
<?php
if (!empty($this->section)) {
$i = 1;
foreach ($this->section as $value) {
echo '<div class="sections"><div><div><div><div><div><h3>';
echo '<a href="'. JRoute::_('index.php?option=com_phocadownload&view=section&id='.$value->id.':'.$value->alias.'&Itemid='. JRequest::getVar('Itemid', 1, 'get', 'int')).'">'. $value->title.'</a>';
echo ' <small>('.$value->numcat.')</small></h3></div></div>';

4. Just edit the red line into this:
echo '</h3></div></div>';

...and you're done!

(Careful not to miss any charachters since PHP get hickups if you even leave out a single dot)

PS. If you're happy with the solution, please mark the first posting in this thread as 'SOLVED' by writing this first on the subject line. Thanx!

Regards
Akerman

Re: Remove Category Count

Posted: 01 Dec 2008, 15:33
by keepitfrozen
Worked perfectly, thanks so much.

Marking Solved.